Elamur Research

Neural Machine Translation with Extended Context

Paper · 2017 · Jörg Tiedemann and Yves Scherrer

Summary

A subtitle can be easy to read and still be hard to translate on its own. The German pronoun sie, for instance, can refer to a woman, an object with a feminine noun, or several people or things. The English translation may need to say she, it, or they. The words that settle the question may occur in an earlier subtitle. Jörg Tiedemann and Yves Scherrer ask whether an existing neural translation system can learn to use those words if training and translation examples are allowed to extend beyond a single aligned unit. Their experiments use German and English movie subtitles from OpenSubtitles2016. Machine translation and coreference resolution meet in this problem.

The authors keep the recurrent encoder and decoder of the Helsinki NMT system and change the sequences it receives and produces. In the setup called 2+1, the system reads the preceding German unit as well as the current one and produces English for the current unit alone. The authors try marking every context token with a prefix and, separately, marking the boundary with a break token. In 2+2, they join adjacent units on both sides of the training example with a BREAK marker. The decoder learns to translate the whole pair, including the break. This gives it access to English words it has already generated for the earlier unit when it starts producing the later one.

On the first 5,000 test units, the systems with context score close to the isolated-unit baseline. The break-marked 2+1 setup scores 27.5 on BLEU, compared with 27.1 for the baseline. It shares the highest current-unit chrF score, reported as chrF3, with 2+2 at 43.3. The authors also inspect the attention weights, which describe how the decoder combines information from source positions as it generates English. About 7.1% of total attention in the extended-source analysis goes to the preceding unit. Individual examples show that this can help the system carry a plural reading forward, or lead it to repeat material from an earlier utterance.

The manual pronoun check gives a narrower result. Among 565 judged occurrences of sie/Sie, the baseline translates 90.1% correctly and 2+2 translates 91.7% correctly. The clearest numerical change is for plural uses, where the respective scores are 69.8% and 79.1%. The differences are statistically inconclusive under the paper’s tests at p = 0.05. A short window can also leave out the phrase that identifies what a pronoun refers to, and the authors have limited evidence that attention across unit boundaries causes the improvements they observe. The study establishes that an ordinary attention-based translation system can handle this way of supplying neighboring text while retaining broadly comparable automatic scores. Its examples show what the extra text can contribute, and why access to it alone gives an incomplete account of the resulting translation.

Deep dive: Neural Machine Translation with Extended Context

Neural Machine Translation with Extended Context tests whether neighboring subtitles help translate ambiguous pronouns from German into English. · about 36 minutes to read

The problem and its context

A sentence can leave the choice open

Many translation decisions depend on information that is absent from the sentence being translated. A pronoun identifies someone or something by pointing to a referent that the speaker expects the listener to recognize. If the preceding utterance introduced that referent, a person following the conversation already has a candidate in mind. A system processing each sentence separately must infer the choice from local wording and the regularities it learned in training. The distinction matters most where several readings fit that wording and the target language makes the translator choose among them.

German sie makes the problem concrete. In an informal third-person use it can be feminine singular or plural. A singular German pronoun can refer back to an inanimate noun with feminine grammatical gender. A suitable English translation can then use it. If the referent is a woman, she may be appropriate. Plural readings often call for they or them, with the choice between those English forms governed by the pronoun’s role in the sentence. The German sentence may already contain agreement information that distinguishes singular from plural. Elsewhere, the wording allows both readings, and what the conversation has just mentioned becomes important. Morphology supplies some of these clues, and discourse supplies others. Discourse analysis

Capitalized Sie adds a polite form of address. English can render it with you, and an English command often leaves the subject unspoken. That gives the translation a legitimate range of outcomes even before the surrounding dialogue is considered. A translation assessment consequently has to ask what the pronoun is doing in its sentence and what the English construction requires. Simply checking for an English pronoun at the corresponding position would treat a normal imperative as incomplete. It would also miss the difference between a pronoun whose function can be inferred from local form and one whose interpretation depends on an earlier utterance.

Reference is the paper’s most closely examined example of a broader problem. A text can reuse a term, carry an argument across sentence boundaries, or signal whether a new utterance answers, continues, or redirects an earlier one. Consistent terminology helps readers follow the same subject through a document. Connectives help them recognize how statements fit together. In dialogue, a short answer may depend on which question it follows. These are different translation decisions, even though all involve information outside the sentence. A way of giving the system the surrounding text could put those decisions within reach of the same translation process.

Earlier attempts to bring discourse into translation

The authors describe a line of work in statistical machine translation that took individual discourse problems as separate tasks. A component might identify how a pronoun refers back to its antecedent, predict a translation for the pronoun, or select a suitable discourse connective. An antecedent is the expression that supplies the identity of a later referring expression. Such a component could be evaluated on its own. To affect a full translation, its predictions also had to reach the decoder, the part of the system that selects target-language wording. Good performance on the component’s own task and an observable improvement to complete translations were separate goals.

The paper also describes work on consistency at the document level. One principle was to prefer a common translation for a term throughout a discourse. A repeated source term can create a thread that readers need to follow in English, particularly when it has a domain-specific meaning. A consistency mechanism treats earlier wording as evidence for the current choice. Research on coherence also considered lexical relationships that tie sentences together. The authors characterize the gains from these earlier efforts as modest in particular tasks, with significant improvements in overall translation quality proving difficult to demonstrate.

The authors see an opportunity in the attention-based encoder and decoder described in Neural Machine Translation by Jointly Learning to Align and Translate. The encoder represents a source sequence at a series of positions. During generation, the decoder uses attention weights to combine information from those positions in different proportions for different output words. A useful source position remains available even if it occurs well before the end of the input. This makes the representation a plausible place to look for evidence from a previous sentence once that sentence is included in the source sequence.

The paper cites a contemporary neural approach that gives the context its own encoder and attention mechanism. That design builds the distinction between the focus sentence and its context into the architecture. Tiedemann and Scherrer ask how far a regular encoder and decoder can go when that distinction is expressed through the training sequences. This choice puts several abilities under examination. The system has to recognize which material belongs in the requested output, decide whether neighboring words help, and learn when those words should have little influence. Pronoun labels and hand-specified links to antecedents play no part in its training.

Why begin with subtitles?

Subtitles provide both large numbers of parallel examples and a reason to expect neighboring text to matter. A movie or television story contains dialogue among recurring participants and references that can persist over several turns. The translated lines follow a story instead of an arbitrary collection of unrelated sentences. The same feature that makes the context informative also makes the task difficult. A viewer may know who is speaking, who has entered a room, or what a character is pointing at. The translation system in this study has the text. Adjacent text can supply some information about the situation, and its usefulness depends on what speakers actually say.

Subtitles also make it practical to lengthen the input. A single aligned unit averages about 8 tokens per language in this corpus. An aligned unit is a span from the German subtitles paired with the corresponding span from the English subtitles. It can contain a complete sentence, a fragment, or several sentences. Subtitle length restrictions help explain why the units tend to be short. The authors expect longer sequences to be harder to translate, so adding a neighboring subtitle unit offers a way to study discourse while keeping the resulting sequences manageable.

That definition of a unit matters throughout the paper. A boundary introduced by the experiment follows the subtitle alignment. It may separate sentences, or it may divide up a longer stretch of speech in a way that imperfectly reflects its grammatical structure. Conversely, a single unit can already contain several sentences and provide some local discourse evidence. The study therefore asks what becomes possible when the system can see beyond the ordinary unit of translation in this corpus. It uses sentence-level language to discuss the linguistic problem, while the windows are built over aligned subtitle units.

The method, step by step

What the encoder and decoder do

The experiments use the Helsinki NMT system, or HNMT, the authors’ named software for training and decoding. Its encoder is recurrent and bidirectional. Recurrence lets the representation at a position incorporate information from a sequence of positions. Bidirectionality lets the encoder read the supplied German from both directions, so the representation of an input token can reflect words before and after it within that input. The decoder generates the English sequence in order. At each output position, attention combines representations of source positions, and the decoder also has access to its own preceding output.

The recurrent units are long short-term memory units, abbreviated LSTM. HNMT includes a hybrid encoder with a character-level fallback, a provision for representing words through their characters when needed. It also includes variational dropout and layer normalization, which concern how the network is trained and how its internal activations are managed. The paper uses the system’s beam search, which keeps several candidate translations in play as output is generated, and describes its coverage penalties, which concern how fully the output accounts for the source. Training and decoding use Theano and can operate on batches of examples on a GPU. These are features of the existing software. The intervention under study is the way subtitle units are assembled. Layer Normalization

Attention provides a sequence of weights for each generated token. A high weight at a source position means that its encoded representation receives a larger share in the combination used for that output step. A position can carry information from its surroundings because the encoder processes the sequence in both directions. Thus the authors can inspect where substantial weight lands, while the linguistic information behind a given decision can be distributed. The paper studies these weights through aggregate measures and through examples that show how attention shifts as the system generates words or punctuation.

Prepare the aligned units and preserve their order

The authors start with aligned German and English subtitles from OpenSubtitles2016. They tokenize the text using the Moses tools, dividing it into units that the software can process, and apply truecasing, which regularizes capitalization. The authors accept the corpus alignments. If dialogue that belongs under one line in a movie has been paired with the wrong stretch of the other language, the resulting pairing stays in both the training data and the references used for testing. That decision makes the preparation straightforward and later complicates interpretation of some output differences. Tokenization

The text is also segmented into sub-words with byte-pair encoding, or BPE. This represents a word as a sequence of pieces when appropriate, so word forms can share parts of the vocabulary. For extended-source training, the paper reports a BPE vocabulary setting of 30,000 and a translation vocabulary of 60,000. The authors explain the latter setting through the prefix variant, where context-marked pieces have identities separate from the corresponding unmarked pieces. For 2+2, they learn BPE codes jointly from German and English at a size of 60,000 and apply BPE with a vocabulary threshold of 50. These choices are part of the recipes used in the experiments. Subword tokenization

They then move through the aligned units in document order with a sliding window. At each position the focus is the current aligned unit. Moving to the next position makes its predecessor available to the context setups. Consequently, a unit that is the main object of translation at one position can supply history at the next. The window is reset at a movie boundary. An opening unit has no previous dialogue from that movie to attach, and the end of a different movie would supply the wrong history.

How neighboring subtitles become translation examples

The steps in order.

How neighboring subtitles become translation examplesStep 1: Prepare aligned German and English subtitle units1. Prepare aligned German and English subtitle unitsStep 2: Segment words into subword pieces2. Segment words into subword piecesStep 3: Slide the window within each movie3. Slide the window within each movieStep 4: Assemble source and target for each setup4. Assemble source and target for each setupStep 5: Encode the German sequence with attention available5. Encode the German sequence with attention availableStep 6: Generate the English sequence with HNMT6. Generate the English sequence with HNMTStep 7: Select the output span for scoring7. Select the output span for scoring

The isolated-unit baseline and the extended source

The baseline takes the German side of the focus unit as input and the English side of that same unit as its target. In training, the system learns to generate the English from this pairing. At test time it translates units individually. If a unit contains fragments from a short exchange, all the German words within that unit are available. Any clue in the preceding aligned unit lies beyond the baseline’s input. This is the reference condition for the comparative experiments.

In 2+1, the source consists of the preceding German unit followed by the focus unit, and the target is the English for the focus unit. The name records the sizes of the input and output in aligned units. The source can contain material that would have a perfectly good English translation of its own. The training target teaches the system to produce only what belongs to the focus. For a short reply, this can mean reading a longer question for context and still generating just the reply. For an ambiguous pronoun, it can mean using a word from the history to choose the number of the English pronoun.

In the prefix variant the authors attach the special prefix cc to each BPE piece in the preceding unit. A context-marked piece has a different vocabulary identity from the unmarked version of the same piece. The source sequence therefore tells the system which pieces have a contextual role even when the same German word appears on each side of the boundary. This offers a direct cue about which text has a corresponding output in the example. It also changes how the same linguistic material is represented in the earlier and later positions.

In the break variant a boundary token separates the preceding German unit from the focus. Ordinary pieces on both sides have the same vocabulary identities. The system can use the break as a positional cue and reuse token representations across the boundary. The authors see a reason to try this arrangement for anaphora, where a referring expression depends on something already mentioned. A relationship between a pronoun and an earlier word can occur within the focus unit or across its boundary, and both instances are expressed with the same ordinary vocabulary. The comparison with prefix marking asks whether explicitly tagging every contextual piece helps more than marking the boundary.

Translate both units together

The 2+2 setup expands the target as well as the source. The source joins the preceding and current German units with BREAK between them. The training target joins their English counterparts in the same order, also using BREAK. The decoder has to generate the earlier English text, produce a boundary, and continue to the later English text. It learns the boundary as an output token alongside the rest of the sequence. At test time the prior English in this procedure comes from the decoder’s own generation.

This changes what it means to use context. In 2+1, copying the substance of a previous utterance into the output can add content outside the requested span. In 2+2, that earlier content belongs somewhere in the output. The problem is to produce a coherent translation for the combined input and place the boundary sensibly. When the system reaches the later part, it can draw on source positions in both units and on English words it generated earlier. This offers a route for target-language dependencies, including agreement with a referent whose English wording has already been chosen.

A sliding window also means a source unit can be translated as the current member of one pair and as the earlier member of the next. The experiment measures particular spans of those generated windows. For its comparison with the single-unit systems, the paper keeps the final output segment. For its paired evaluation, it uses the complete output and strips the boundary tokens before scoring. These choices answer different questions. The former tests how well the system delivers the current subtitle under the original segmentation. The latter assesses the full text after the two units have been combined.

How the attention measurements are constructed

The paper describes the attention calculations procedurally. They can be expressed by writing the quantity of attention directed to the other source unit as follows.

E = ∑ⱼ∈C aⱼ

E is summed external attention for a generated token. C is the set of source positions in the other unit, j identifies a source position, and aⱼ is the attention weight at that position for the generated token under inspection. ∑ adds the weights, ∈ means membership in the set, and = defines the quantity on the left. In the extended-source arrangement the other unit is the preceding German context. In the paired arrangement its identity depends on which output segment contains the generated token.

The total on the current side is defined with the matching set of source positions.

I = ∑ⱼ∈F aⱼ

I is summed internal attention. F contains the source positions in the unit corresponding to the generated token’s segment. j, aⱼ, ∑, ∈, and = have the same roles as in the external sum. When the paper reports a proportion based on the two sums, it divides the external contribution by the combined external and internal contributions. The paired analysis of ordinary words excludes attention on break symbols, so the reported proportions concern links to the text of the units.

The authors also check whether attention to the other unit is concentrated at a particular position. For that view they replace each sum with the largest weight on its side and compare the external and internal peaks. Finally, for the paired output, they count how often the largest external weight exceeds the largest internal weight for a given output word type, and divide by the total occurrences of that type. A word type pools instances of a word across the test output. These measures answer related questions about how much weight crosses a boundary, how strongly the decoder attends to a particular position there, and how often that position outranks every position in the corresponding unit.

Experiments and results

The evaluation material and the systems compared

The corpus covers 16,910 movies and TV series. The authors randomly reserve 400 movies for development and testing, keeping the text of those movies outside the training data. The final German–English corpus comprises 13.9 million aligned units, with about 107 million German tokens and 115 million English tokens. Training uses 13.5 million instances. The first 5,000 units in the test set supply the automatic evaluation. These figures describe the same subtitle collection at different levels, from the number of works represented to the amount of text available for individual training and evaluation examples.

The baseline, the two variants of 2+1, and 2+2 use similar HNMT parameters. The authors run training for roughly comparable numbers of iterations and aim for comparable amounts of exposure to training examples. For decoding, they combine the final four saved states from each run in an ensemble. A savepoint captures the trained parameters at a particular stage. Combining nearby savepoints reduces some dependence on the choice of a single state. The authors note that stochastic training still complicates comparisons when the score differences are small.

The automatic evaluation serves first as a check on translation quality. Giving the system a longer input creates a possibility that it will confuse the history and the focus. Adding an earlier segment to the target introduces a separate possibility that the decoder will place its break poorly. The scores tell the reader whether such difficulties make the translations, taken as a whole, substantially less like the English references. The measures compare text with its reference, whereas a discourse question can turn on a particular pronoun in an otherwise similar subtitle. That is why the paper follows the general scores with a more concentrated evaluation.

Scoring the current unit

BLEU measures overlap between a translation and a reference using sequences of word tokens. The paper’s alternative, chrF3, uses sequences of characters. It reports the character measure along with precision and recall. Precision describes how well the material offered by the system matches the reference, and recall describes how much of the reference material the system recovers. The appendix of results is unnecessary to make the comparison here because the central point is where the scores lie and which parts of the output they measure.

For the single-unit comparison, 2+2 contributes its final generated segment. The earlier output is ignored for this evaluation. The other systems already produce only the current English unit. Thus the references cover the same span across the comparison, although the systems saw different spans on input and 2+2 generated an additional span before reaching the scored portion.

BLEU on the current OpenSubtitles2016 test unit

Marking the source boundary gives the highest BLEU, with the settings close together.

BLEU on the current OpenSubtitles2016 test unitBaseline: 27.1Baseline27.12+1 with context prefixes: 26.52+1 with context prefixes26.52+1 with a source break (this paper): 27.52+1 with a source break (this paper)27.52+2 with breaks on both sides: 26.52+2 with breaks on both sides26.5
The numbers
System or settingBLEU
Baseline27.1
2+1 with context prefixes26.5
2+1 with a source break (this paper)27.5
2+2 with breaks on both sides26.5

On chrF3 for the same test units, the baseline scores 42.9 and the prefix-marked 2+1 system scores 42.7. The break-marked 2+1 and 2+2 systems both score 43.3. In that order, the table reports precision values of 54.7, 51.2, 52.8, and 54.4, and recall values of 41.9, 41.9, 42.5, and 42.3. The authors connect the slightly higher chrF3 scores for the break conditions with their higher recall. The shared chrF3 score for the break conditions accompanies different balances of precision and recall.

Taken together, the current-unit results support the practical feasibility of the longer input. The break-marked extended source leads on BLEU and shares the lead on chrF3. The paired setup falls below the baseline on BLEU while exceeding it on chrF3. The prefix-marked variant is slightly below the baseline on both measures. A claim that extending the context improves translation across the board would require a more consistent pattern. Here the differences are small, and the paper’s main use of the comparison is to establish that processing the extra text leaves general translation quality in much the same range.

Scoring the complete pair

The authors also ask how 2+2 fares on the complete sliding-window sequence. For this comparison, both the reference and the hypothesis cover the neighboring units, and the break markers are taken out. The baseline enters through the concatenation of its independently produced translations. It has supplied English for the same amount of German, with each unit translated separately. The paired system has generated the entire English sequence together. Comparing them on the longer span gives both systems credit for English words that appear in the combined reference even when the system places a boundary differently.

chrF3 on paired OpenSubtitles2016 test units

Jointly translating the pair yields a slightly higher character overlap score.

chrF3 on paired OpenSubtitles2016 test unitsConcatenated baseline translations: 44.14Concatenated baseline translations44.142+2 joint translation (this paper): 44.542+2 joint translation (this paper)44.54
The numbers
System or settingchrF3
Concatenated baseline translations44.14
2+2 joint translation (this paper)44.54

On this paired evaluation, BLEU is 27.25 for the concatenated baseline and 27.41 for 2+2. Character precision is 55.61 and 55.51, respectively, and recall is 43.15 and 43.58. The paired result is therefore another small advantage in character recall and in the combined measure, alongside a small difference in the other direction for precision. These scores apply to longer hypotheses and references than those in the current-unit comparison. They describe joint translation against independent translation on paired spans, with the effect of an exact break location removed from the scored text.

The distinction matters when a reference puts the English for a German clause on the other side of a subtitle boundary. A translation that preserves the clause in the complete output can look as though it omitted content in one unit and inserted unrelated content in another when those units are scored in isolation. Pairwise scoring can absorb some of that mismatch. An actual subtitle delivery task may still care about which words appear when, so the paired evaluation measures one property of the output and the current-unit evaluation measures another.

Judging the ambiguous pronoun

The manual evaluation compares the baseline and 2+2 on sie/Sie. The authors identify 1143 occurrences across 1018 test sentences and judge 565 occurrences in 516 sentences. They use the reference to assign each item to a category. There are 101 polite imperatives, 301 other polite forms, 77 feminine singular uses, and 86 plural uses among the judged items. This division separates readily recognized forms of address from the third-person readings that motivate the closer examination of context.

The baseline scores 98.0% on polite imperatives and 94.4% on other polite uses. The 2+2 system scores 97.0% and 95.0% on those respective categories. Both score 85.7% on feminine singular occurrences. Across the full judged set, accuracy is 90.1% for the baseline and 91.7% for 2+2. The plural category gives the largest numerical separation and is also the category with the lowest accuracy for each system.

Accuracy on plural sie in the manual subtitle test

Joint translation yields more correct plural readings in the judged sample.

Accuracy on plural sie in the manual subtitle testBaseline: 69.8Baseline69.82+2 joint translation (this paper): 79.12+2 joint translation (this paper)79.1
The numbers
System or settingaccuracy %
Baseline69.8
2+2 joint translation (this paper)79.1

The authors assess the differences with chi-squared tests at p = 0.05. Here p gives the threshold used for judging statistical significance. The reported differences fail that test. The plural results show where improvement is most apparent in the judged sample. The examples and attention analyses help explain why that pattern is plausible, while the test leaves its reliability across other samples unsettled.

What the ablations show

What changes in the controlled comparisons

The paper offers comparisons among input and output settings and several diagnostic analyses. It leaves causal ablations of attention, such as blocking cross-boundary links during translation, outside the experiment. The architectural continuity across runs is informative. The same kind of encoder and decoder can be trained to translate a single unit, to read an extra unit and translate only the focus, or to produce English for the complete pair. The system’s ability to handle these tasks is demonstrated without adding an encoder specifically for discourse history.

The prefix and break settings offer the closest comparison of how to mark the source history. Both give the decoder a translation target drawn from the current unit alone. Both supply the previous German. A difference lies in how the system encounters the same word on either side of the boundary. In the prefix setting the contextual and ordinary pieces have distinct identities. In the break setting the ordinary identities are shared and the separate boundary token signals the transition. On the current-unit metrics, the break setting fares better. This favors the tested break recipe on these data. The comparison does not isolate a benefit attributable specifically to shared representations, since changing the marking also changes the token inventory the network uses.

The comparison of 2+1 and 2+2 bears on a different question. Their output objectives differ. In 2+1, the network has to decide how the source history can inform a translation whose scope stops at the focus unit. In 2+2, it translates the history and can use that English while producing the current unit. The available target-side information and the task assigned during training consequently change together. A particular success in 2+2 could arise from its source history, its earlier English, or how joint training organizes the sequence. The example in which 2+1 also selects the appropriate plural pronoun shows what source history can suffice for in an individual case.

Pairwise scoring supplies a further comparison with a clear purpose. The authors join baseline outputs to create a reference condition for the longer span. It controls for the amount of output being compared against the two-unit reference. Any advantage for 2+2 under this evaluation can be associated with translating the combined span as a task, subject to the other differences between the training recipes. Its small gains on both automatic scores for paired units give little basis for deciding whether the improvement came from reference, word choice, or the placement of content near the boundary.

When attention spills into the translation

In 2+1 the decoder generally has to put most of its attention on the focus unit. The training targets tell it, through examples, that the English associated with the preceding unit belongs outside the output. The authors report that some confusion is visible early in training and that the system learns to produce adequate translations despite the additional information. Over the data examined, about 7.1% of total attention goes to the previous unit. That leaves room for particular tokens and utterances to draw much more heavily on history than the overall figure suggests.

One such case involves a brief answer after a request to come to an office for a conversation. The current German amounts to ja. The English output affirms the request and adds that the speaker wants to talk. The added content tracks wording from the preceding German, and much of its attention falls there. As dialogue, such a continuation could make sense if the same person were reinforcing the request. It could change the meaning if the current speaker were someone else answering. This is a case where the extra source material clearly affects what comes out and where evaluating the result requires attention to the turn structure.

Another short follow-up responds to an offer to tell someone something pleasant. The extended-source system produces a question that brings back the earlier idea of hearing something. The attention display places part of the weight on the offer, consistent with that interpretation of the output. The authors regard the resulting wording as likely to misrepresent the exchange. They also find a case in which the translation supplies a form of address from the preceding unit in place of an expression in the current one. In these examples the contextual text supplies plausible words, and the harder decision is whether those words belong to the speaker and utterance being translated.

These cases show why high attention to neighboring text cannot serve as a quality measure on its own. Incorporating a missing referent and repeating an earlier request can both produce a conspicuous link across the boundary. Their consequences differ. A pronoun resolved consistently may preserve what the current speaker meant. Repeated source content can attribute an earlier request to a reply. A diagnostic is useful here because it identifies where to examine the output and how to relate it to the neighboring text.

How the choice of attention statistic affects the picture

The authors inspect which English words have comparatively high external attention in the extended-source output. They lower-case the output for this analysis and restrict the ranked words to those occurring more than four times. The average external proportion in the word-type table is 4.9%, which is reported for that analysis alongside the separate overall figure of about 7.1%. The ranked words include dialogue responses such as yeah, yes, and oh. These are plausible places to find evidence from the previous utterance because their conversational role can depend on what came before.

Some of the ranked words occur away from the beginning of the unit. For instance, the mean output position for yes in the table is 4.22, and for anywhere it is 7.67. That spread gives the authors reason to examine more than an opening-token effect. It also makes a single linguistic interpretation of the ranking difficult. A word can have high external attention because the dialogue makes the previous utterance relevant, because it is hard to align to one source word, or because the surrounding subtitle text has been mixed into the output. A high average across occurrences can contain several such cases.

The extended-source table reports external proportions of 12.9% for she, 10.8% for he, and 10.0% for it. The corresponding entry for they is 9.9%. These figures put some pronouns among the words for which external attention is of interest. They do not say whether the attended position names an antecedent. Attention to a previous agreement cue, a nearby content word, or several weakly related tokens can all raise the external total.

To distinguish concentrated attention from weight spread across many source positions, the authors compare the largest external and internal weights for each occurrence. Under this measure she moves from rank 36 by summed proportion to rank 20 by peak proportion. Its reported external share for the peak comparison is 15.3%. He moves from rank 62 to rank 50. The movement supports the authors’ tentative reading that pronouns can attend more selectively to particular positions outside the current unit. The identity of the attended positions and the effect of that attention on the chosen English pronoun remain questions for inspection of individual cases.

What changes when both units are translated

In the paired output, the authors find words that attend into the source segment corresponding to the other part of the English. This can happen in either direction across the source break. Even while generating the earlier part of the English, the decoder can attend to a later source position because the full German pair is already present. By the time it generates the later English, it also has its own earlier English available. Source attention and access to previously generated target words are distinct routes through which the sequence can affect the translation.

The average cross-segment attention proportion in the paired word-type table is 3.1% after attention on break symbols is excluded. Some responses and adverbs rank highly. Pronouns are low enough in this particular ranking that the authors leave them out of the displayed list. This places a limit on what can be inferred from a general ranking about pronoun behavior. A system can use cross-segment information for some occurrences of a pronoun even if its average external attention across all occurrences is modest.

Ranking by average peaks introduces a different issue. Words of relatively low frequency appear near the top, including forms attached to leading hyphens as a result of tokenization errors. Many occur at the beginning of the output segment. A few unusual examples can have substantial influence on a mean for such a word. The authors therefore add an analysis that counts the occurrences for which the strongest attention is on the external side. They normalize by overall frequency and keep word types with more than four externally dominant occurrences.

In this view, a word can rank highly if its strongest attention regularly crosses the break, even if the raw weight summed over that segment is modest. The list brings out response particles and punctuation as well as words such as here, what, and that. The authors trace a directional tendency. Items with an affinity for the beginning of a segment often attend backward, while punctuation and some other items associated with the end of a segment attend forward. The pattern is compatible with the idea that neighboring segments help mark the structure of an exchange. The small absolute counts make the analyses suggestive, especially for less common words.

The decoder’s own BREAK token has interpretable attention in some examples. Its generation can draw on source punctuation and words at the beginning of segments, including points near a question mark. Those are reasonable places to find evidence that a stretch of dialogue has ended or that a new one is starting. The paper also describes cases where output words and boundaries move relative to the reference. In an example involving a question about leaving and a reply about waiting, the German and English alignments place the question on different sides of a boundary. A combined translation can read coherently while disagreeing with the supplied division. Such a case raises an alignment question before it raises a question about fidelity of the dialogue as a whole.

What the pronoun examples establish

A paired sequence in the paper asks where some people or things are, followed by a question about seeing them. The German in the first question includes sind, a plural verb form. The earlier English pronoun is they. In the second question, the baseline chooses her, a possible reading if the question is read by itself. The extended output chooses them, which preserves the plural reading across the exchange. As it generates them, the weight on sind is 0.031, larger than the weights on the other positions in the preceding unit at that step. This connects the output choice with a plausible source of grammatical evidence.

The same choice of them occurs in 2+1 for that example. The preceding German is present in both setups, while 2+1 has generated no English translation of the earlier question at that point. This establishes that the correct choice is possible with the supplied source history alone in that particular exchange. It does not measure how often that suffices. The paired decoder also omits the English auxiliary and subject in its second question. The authors suggest a possible connection with the colloquial training material. The example is consequently strong evidence of a more coherent pronoun choice in a translation that still has other wording decisions to assess.

Other plural examples contain a more explicit potential antecedent. In one, the earlier subtitle refers to men, and the current command tells Max to find the person or people denoted by sie. The baseline uses her. The paired translation uses them, consistent with the earlier group. Another exchange concerns people hiding among garbage. The paired output retains plural pronouns through the later instruction, while the isolated translation opts for feminine singular forms. The improved number agreement is a specific observation about these examples. Their overall English quality can still vary independently of the pronouns.

The feminine singular category illustrates the difference between examples and aggregate outcomes. In one exchange, the subject of discussion is a matter or story. English it is coherent when the speaker asks what else it could mean. The baseline uses she, and 2+2 uses it. Another exchange concerns an old mine. The paired translation chooses it where the baseline chooses she, though other aspects of the English remain imperfect. Both systems still score 85.7% across the judged feminine singular items. Examples with a corrected pronoun therefore establish that the adaptation sometimes helps on that category. The equal aggregate scores leave the category-wide balance of successes and failures unchanged in the judged sample.

The paper gives a converse case in which the conversation turns to a sunrise. The German noun for sunrise is masculine. In the current unit, er refers to it, and natural English uses it. The directly preceding subtitle offers an encouragement that leaves its object implicit. The noun appears earlier than the context supplied to the system. The baseline uses it, and the extended output uses he. This example shows that the contextual system has altered a pronoun decision while lacking the distant information that would resolve it. It also explains the authors’ interest in longer windows, whose effectiveness they leave open.

Finally, the polite forms help explain why the overall manual score can remain close while the plural category shows a clearer change. Polite uses dominate the judged sample and are generally translated well. A German polite command can legitimately become an English command with no overt subject. Outside commands, the polite pronoun commonly becomes you. The authors attribute many remaining polite-form mistakes to skipped content or to lowercasing errors at sentence openings. The plural cases are the part of the manual evaluation where the need to recover a cross-sentence reading is most visible.

Limitations

Limits identified by the authors

The authors present the study as a pilot. The qualitative inspection supplies cases of changed wording, plausible use of earlier information, and errors introduced by context. Its coverage is selective. Attention plots and individual outputs can illustrate a behavior that the translation system is capable of, while leaving its frequency unclear. The authors accordingly call for more systematic studies of particular discourse phenomena and of alternative ways of representing the history.

The manual pronoun comparison remains statistically inconclusive at the authors’ threshold. The individual categories contain quite different numbers of occurrences, and the largest apparent benefit is in a smaller category. The high baseline scores for the common polite uses also mean that the overall result combines already reliable decisions with more difficult third-person choices. The paper’s examples support a close reading of those harder cases. General claims of reliably improved pronoun translation would require broader evidence.

The authors also identify the short history as a limit on what a system can recover. The sunrise example places a decisive antecedent outside the window. Some immediate neighbors can carry enough information to resolve a pronoun. Others contain only a reaction or continuation with little evidence about the referent. A wider window would make more antecedents available, and the authors leave open whether the system would find the right one among the additional text.

A second contextual limit concerns what is present in the subtitles at all. The actual speaker, the direction of a reply, and what can be seen on screen can determine how a line should be understood. The study supplies neighboring text and does not supply those signals. In the cases where the system carries a request or phrase into another speaker’s utterance, the authors suggest that speaker identity or turn information could matter. The text extension addresses distance within the subtitle sequence. It reaches only indirectly whatever parts of the scene the subtitles imply.

The paper further separates plausible attention from evidence that attention caused an improvement. The decoder’s translation and its weights are observed together. In a paired sequence, its earlier English can contribute to the current choice, and the source representation can contain information from nearby positions. The authors say the role of cross-segment attention in the improved outputs still needs investigation. They also leave open how effects seen in their selected examples carry over to the extended-source variants.

Limits of the experimental setup

The domain and language direction constrain generalization. German-to-English subtitles are the sole translation setting examined here. The paper chose it in part because the authors could inspect the output readily, and the units are unusually short compared with edited texts of the sorts they discuss. A corpus of longer sentences would change what is already available within the focus unit and how much additional material the encoder must process. A different language direction could also change which distinctions the target requires the system to express. The experiment establishes behavior for this subtitle setting.

The corpus alignment makes the unit boundary an imperfect guide to the linguistic structure. Some subtitle units divide a sentence and others contain several sentences. Some German and English clauses are misaligned. A current-unit score therefore measures delivery of the expected English content within the expected span as well as lexical similarity. Pairwise scoring reduces some effects of boundary placement and simultaneously makes it less sensitive to when a clause appears. Neither scoring span by itself captures the full quality of a subtitle sequence. Each defines a specific evaluation target.

The comparisons preserve the main translation architecture, but the scope of the examples changes several learning conditions together. Prefix marking changes token identities. The paired setup changes the BPE recipe and gives the decoder a longer target with an internal boundary to generate. Comparable training iterations and ensembles of recent savepoints make comparisons easier to interpret. They leave variation across independent training runs unmeasured in the reported results. A small difference between settings is consequently most informative as part of the observed score pattern.

The pronoun assessment covers only part of the extracted occurrences and compares the baseline with 2+2. It provides no corresponding manual accuracy for each 2+1 marker setting. The attention analysis and the automatic metrics describe those settings in other ways, which limits direct comparisons about pronoun disambiguation. In particular, the strongest automatic result on current-unit BLEU belongs to the source-break setting, while the manual result belongs to paired translation. The results answer different questions about different systems.

Finally, the study offers demonstrations of coherence across nearby units. It does not evaluate entire stories for consistent terminology, stable characterization, faithful speaker attribution, or patterns of reference over long stretches. The authors’ discussion of coverage points to a tension that becomes visible even in the short windows. A translation system is usually expected to avoid unjustified additions and omissions. If adjacent lines are translated together, a coherent rendering can sometimes shift wording across their original boundary. The appropriate distinction depends on whether the intended output is an individually timed subtitle, the combined utterance, or a longer text that preserves the exchange.

What came after

From plausible examples to discourse evaluation

Subsequent work took up different parts of the question opened here. One direction was to make the evaluation itself more sensitive to discourse. The subtitle study combines general translation scores with a manual check of sie/Sie because a small change in wording can make a large difference to the coherence of an exchange. Evaluating Discourse Phenomena in Neural Machine Translation takes the evaluation of discourse phenomena as its subject. It extends the concern behind the manual check into a broader question about how to test translation behavior at the level where those phenomena occur.

Another line narrows the question to what a translation system learns about reference. Context-Aware Neural Machine Translation Learns Anaphora Resolution focuses on anaphora resolution, the task of connecting a referring expression to what it refers to. This is the specific competence that the paired subtitle examples suggest. The link between the studies is the distinction between a correct English pronoun and evidence about the dependency the system has learned. Context-aware Neural Machine Translation with Coreference Information approaches that dependency through the use of coreference information, making reference an explicit part of the context available to translation.

When a Good Translation is Wrong in Context broadens the discourse question through deixis, ellipsis, and lexical cohesion. Deixis concerns expressions whose interpretation depends on the situation or point of view, ellipsis concerns material left unspoken but recoverable, and lexical cohesion concerns the way choices of words connect stretches of text. These phenomena give more ways for a sentence to read acceptably on its own and still fit the surrounding text poorly. The subtitle pilot makes this distinction easy to see with her and them. The later work’s scope extends it beyond the particular German pronoun that the pilot counts.

How to represent and use a longer history

The subtitle approach treats neighboring units as a longer sequence. Document-Level Neural Machine Translation with Hierarchical Attention Networks studies document-level translation with hierarchical attention, bringing the organization of a document into the design of the attention architecture. Selective Attention for Context-aware Neural Machine Translation centers the choice of which context receives attention. Both directions relate to a problem visible in the original diagnostics. A neighboring subtitle can contain the exact clue that disambiguates a word, and it can also contain material that gets carried over at the wrong moment. The architecture determines how the system can organize and select from that material.

Other work continues to ask how simple a design can be. A Simple and Effective Unified Encoder for Document-Level Machine Translation puts a unified encoder at the center of document translation. Its connection to the subtitle pilot lies in the question of how much can be achieved when context and the text to translate are represented together. Document-level Neural MT: A Systematic Comparison takes comparison itself as the subject. In the pilot, the prefix, break, and joint translation settings give an initial set of alternatives. Systematic comparison makes the choice among document-level approaches a research question in its own right.

Context can also enter after an initial translation. Context-Aware Monolingual Repair for Neural Machine Translation frames the intervention as monolingual repair. That puts the emphasis on editing the translated text in light of context. The subtitle paper’s paired decoder can condition a later word on English it has already generated. Repair offers a different point for applying information from the translated discourse, once an initial rendering is available to revise.

When context helps

When and Why is Document-level Context Useful in Neural Machine Translation? makes the usefulness of document context conditional on the circumstances of translation. The subtitle experiments already show why the question deserves that form. When the immediately preceding unit contains a plural verb or an explicit group, it can support a coherent pronoun. When the relevant noun occurs beyond the window, the intervening line may contribute little. And when the system takes material from a different speaker’s turn, the available context can encourage the wrong output.

That question also carries over to evaluation. Assessing the Role of Context in Chat Translation Evaluation asks when context is helpful in judging translated chat. In the subtitle study, the evaluator needs the surrounding exchange to see why a plausible isolated reading is wrong or why a repeated phrase changes the speaker’s meaning. Chat translation brings the role of conversational context into the evaluation question directly. Context-8 makes sensitivity to context the object of a dedicated machine translation dataset. The connection is to the pilot’s choice to extract a focused set of pronoun decisions from a broader test set. General overlap scores describe how much of a reference the output matches, while an evaluation centered on context asks whether the translation responds appropriately to the surrounding text.

 Institutions

 Fields, topics and concepts

 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works

 Topics 1Research subjects and languages the work is about.Machine translation · 1,109 works

Appears in

Mentioned in articles aboutHelsinki

Cite

Cite as Jörg Tiedemann and Yves Scherrer. 2017. Neural Machine Translation with Extended Context. Proceedings of the Third Workshop on Discourse in Machine Translation.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/w17-4811

@inproceedings{tiedemann2017neural,
  title = {{Neural Machine Translation with Extended Context}},
  author = {Jörg Tiedemann and Yves Scherrer},
  booktitle = {Proceedings of the Third Workshop on Discourse in Machine Translation},
  year = {2017},
  doi = {10.18653/v1/w17-4811},
  url = {https://doi.org/10.18653/v1/w17-4811}
}

References

2 references, 2 of them with a card of ours. Each entry links to our card when we hold the work, else to OpenAlex and Google Scholar searches for it.

  1. Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. 2016. Layer normalization. ArXiv e-prints .
  2. Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. CoRR abs/1409.0473.

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/tiedemann-2017-neural-machine-translation-extended-context/