Neural Machine Translation with Gumbel-Greedy Decoding

Jiatao Gu, Daniel Jiwoong Im, Victor O. K. Li

Abstract

Previous neural machine translation models used some heuristic search algorithms (e.g., beam search) in order to avoid solving the maximum a posteriori problem over translation sentences at test time. In this paper, we propose the Gumbel-Greedy Decoding which trains a generative network to predict translation under a trained model. We solve such a problem using the Gumbel-Softmax reparameterization, which makes our generative network differentiable and trainable through standard stochastic gradient methods. We empirically demonstrate that our proposed model is effective for generating sequences of discrete words.

Introduction

Standard Neural Machine Translation (NMT) models often suffer from exposure bias, a fundamental mismatch between training and inference. During training, models typically use "teacher forcing," predicting the next word based on ground-truth history. At test time, however, the model must rely on its own previously generated (and potentially erroneous) words. Furthermore, finding the optimal translation sequence is a computationally intractable Maximum A Posteriori (MAP) problem, usually addressed with heuristic search methods like greedy or beam search. These methods are often sub-optimal because the underlying model was not explicitly trained to optimize for these specific search procedures.

Methodology

To bridge this gap, this paper introduces Gumbel-Greedy Decoding (GGD), a framework that treats the search process as a learnable, differentiable function. The architecture consists of a Discriminator-Generator framework:

  1. The Discriminator: A standard NMT model that assigns a log-likelihood score to a translation given a source sentence.
  2. The Generator: A separate network trained to produce translations that maximize the discriminator's score.

The primary technical challenge is the non-differentiability of discrete word selection. To enable backpropagation, the authors employ the Straight-Through (ST) Gumbel-Softmax estimator.

Illustration of the computational flow for GGD training. The generator produces sequences that the discriminator evaluates, with gradients flowing back through the Gumbel-Softmax nodes.

In the forward pass, the ST-Gumbel estimator selects discrete words, ensuring that actual word embeddings are fed into subsequent time steps—a crucial step for maintaining coherence in recurrent networks. In the backward pass, it provides a differentiable approximation, allowing the generator to receive feedback from the discriminator. To maintain stability, the authors incorporate entropy regularization and an iterative adversarial training scheme.

Experimental Results

The GGD framework was evaluated on the WMT’15 parallel corpora for Czech-English (Cs-En) and German-English (De-En) language pairs. GGD consistently outperformed standard Maximum Likelihood Estimation (MLE) and reinforcement learning (REINFORCE) baselines.

Comparison of greedy BLEU scores during training. GGD-GAN variants (red and purple) clearly outperform the MLE and RL baselines (dashed/solid black lines).

On the Cs-En task, GGD achieved a greedy BLEU score of 20.62, a significant improvement over the MLE baseline of 18.90. The results also highlighted the importance of adversarial training; training the discriminator alongside the generator (GGD-GAN) proved more effective than using a fixed, pre-trained discriminator. Additionally, sensitivity analysis showed that the Gumbel-Softmax temperature ($\tau$) is a critical hyperparameter, with $\tau = 0.5$ found to be the optimal balance between gradient stability and bias.

Conclusion

Gumbel-Greedy Decoding provides a novel and effective method for training NMT models by making the decoding process differentiable. By learning to optimize for the search strategy directly, GGD achieves significant gains in translation quality over traditional heuristic search baselines. Future research directions include direct optimization of evaluation metrics like BLEU and scaling the framework to larger datasets and diverse sequence-to-sequence tasks.

Summary updated

BibTeX
@inproceedings{gu2018neural,
  author = {Jiatao Gu and Daniel Jiwoong Im and Victor O. K. Li},
  title = {{Neural Machine Translation with Gumbel-Greedy Decoding}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  url = {https://openreview.net/forum?id=H1ZJR6xO-H},
}
Figure