Discrete Structural Planning for Neural Machine Translation

Raphael Shu, Hideki NakayamaarXiv 2018 · OpenReview

Abstract Structural planning is important for producing long sentences, which is a missing part in current language generation models. In this work, we add a planning phase in neural machine translation to control the coarse structure of output sentences. The model first generates some planner codes, then predicts real output words conditioned on them. The codes are learned to capture the coarse structure of the target sentence. In order to obtain the codes, we design an end-to-end neural network with a discretization bottleneck, which predicts the simplified part-of-speech tags of target sentences. Experiments show that the translation performance are generally improved by planning ahead. We also find that translations with different structures can be obtained by manipulating the planner codes.

Introduction

Standard Neural Machine Translation (NMT) models often struggle with long-sentence structure because they lack a "big picture" plan. Most current architectures are "reactive": they generate the next word based on a continuous hidden state that remains structurally ambiguous until the words are actually sampled. This lack of explicit planning leads to structural uncertainty, where a single source sentence can be translated into multiple valid target structures (e.g., active vs. passive voice). Without a plan, the model may produce inconsistent or ungrammatical long sentences. Furthermore, it leads to search inefficiency during beam search, as the model explores a massive space of word combinations without a clear roadmap of the intended sentence architecture.

Methodology

The authors propose a two-stage framework: Code Learning and Planning-based Translation. To create a "plan," they first simplify the target sentence's Part-of-Speech (POS) tags, keeping only essential tags (Nouns, Verbs, Pronouns, and punctuation) and removing consecutive duplicates. This creates a coarse syntactic "skeleton" of the sentence.

They then design an end-to-end neural network that learns to compress these structural skeletons into a small set of discrete "planner codes" ($C$). They use the Gumbel-Softmax trick to allow backpropagation through these discrete choices. During training, these learned codes are prepended to the target sentence, separated by an "end-of-codes" (<eoc>) token. The NMT model is then trained to predict the codes first, and then the words.

Figure 1: Overview of the planning-based NMT model architecture, showing the generation of planner codes followed by output words.

At test time, the model uses beam search to find the most likely sequence of planner codes given the source sentence, then generates the translation conditioned on those codes.

Experimental Setup

The model was evaluated on two major translation tasks:

  • IWSLT 2014 German-to-English (De-En): A dataset of roughly 178,000 bilingual pairs.
  • ASPEC Japanese-to-English (Ja-En): A scientific paper corpus containing 3 million bilingual pairs.

Preprocessing included standard tools like Kytea for Japanese tokenization and Moses for other languages, applying Byte Pair Encoding (BPE) to handle vocabulary.

Results and Analysis

The planning-based model consistently outperformed the baseline NMT model across different beam sizes. On the De-En task, BLEU scores improved from 29.52 to 29.78. On the Ja-En task, it improved from 25.26 to 25.69. The authors hypothesize that planning ahead allows the model to explore more diverse candidates during beam search, which is particularly helpful for language pairs with very different word orders, like Japanese and English.

Analysis of the learned codes showed a skewed distribution, suggesting the model successfully learned common structural templates. There is a trade-off between code length ($N$) and the number of code types ($K$). If the codes have too much capacity, the NMT model finds it hard to predict the "correct" code; if they have too little, they can't represent the sentence structure accurately. The authors found $N=2, K=4$ (4 bits of info) to be the optimal setting.

Controllable Paraphrasing

One of the most striking findings is that by manually overriding the model's predicted codes, users can force the NMT engine to generate the same translation in different styles while maintaining the original meaning. This demonstrates that the planner codes effectively capture structural information independent of the specific lexical choices.

Figure 5: Examples of controllable paraphrasing for a Japanese input sentence. Different code sequences lead to distinct grammatical structures (e.g., passive vs. active voice).

Conclusion and Future Work

The study demonstrates that discrete structural planning can significantly enhance NMT performance and provide a mechanism for structural control. Future work could extend this "planning phase" to other latent factors beyond syntax, such as sentiment or topic. Additionally, addressing the underutilization of code capacity could lead to even more robust structural representations.

Summary updated

Abstract

Structural planning is important for producing long sentences, which is a missing part in current language generation models. In this work, we add a planning phase in neural machine translation to control the coarse structure of output sentences. The model first generates some planner codes, then predicts real output words conditioned on them. The codes are learned to capture the coarse structure of the target sentence. In order to obtain the codes, we design an end-to-end neural network with a discretization bottleneck, which predicts the simplified part-of-speech tags of target sentences. Experiments show that the translation performance are generally improved by planning ahead. We also find that translations with different structures can be obtained by manipulating the planner codes.
BibTeX
@misc{shu2018discrete,
  author = {Raphael Shu and Hideki Nakayama},
  title = {{Discrete Structural Planning for Neural Machine Translation}},
  year = {2018},
  eprint = {1808.04525},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.04525},
}
Figure