Dual Skew Divergence Loss for Neural Machine Translation

Fengshun Xiao, Yingting Wu, Hai Zhao, Rui Wang, Shu JiangarXiv 2019

Abstract

Standard Neural Machine Translation (NMT) models typically rely on Maximum Likelihood Estimation (MLE), which minimizes the Kullback-Leibler (KL) divergence between the data distribution and the model's predictions. However, this approach is susceptible to exposure bias and overgeneralization. We present Controllable Dual Skew Divergence (cDSD), a novel loss function that interpolates between symmetric KL divergence terms to improve model robustness. To manage the training stability of complex architectures like Transformers, we employ a Proportional-Integral (PI) controller to adaptively tune the loss weights. Our evaluation on WMT benchmarks shows that cDSD consistently outperforms MLE baselines across multiple architectures, facilitating an escape from local optima during the training process.

Introduction

Most NMT systems are trained using word-level cross-entropy loss, which is mathematically equivalent to minimizing the KL divergence $KL(Q||P)$, where $Q$ represents the ground-truth distribution and $P$ the model's predictive distribution. While effective, this objective function leads to two primary issues:

  1. Exposure Bias: A discrepancy between training (where gold-standard data is used) and inference (where the model relies on its own previous predictions).
  2. Overgeneralization: The model attempts to cover the entire data distribution, often leading to "safe" but less precise samples.

While the reverse divergence $KL(P||Q)$ can encourage the model to focus on its own predictive distribution, it is often numerically unstable and difficult to optimize. This work explores a symmetric approach that leverages both directions of divergence to mitigate these issues.

Methodology: Controllable Dual Skew Divergence

The proposed Dual Skew Divergence (DSD) loss interpolates between $KL(Q||P)$ and $KL(P||Q)$. To ensure numerical stability—especially when the target distribution $Q$ is sparse—the authors utilize $\alpha$-skew divergence. This method approximates the KL divergence by mixing a small fraction of the alternate distribution into the target, ensuring the objective remains well-defined.

PI Control for Dynamic Loss Tuning

For deep architectures such as the Transformer, a static interpolation weight $\beta$ is often insufficient to maintain stability. The authors introduce Controllable DSD (cDSD), which incorporates a Proportional-Integral (PI) controller. This controller monitors the "error" between the current divergence and a predefined set point—derived from a converged MLE model—and dynamically adjusts the weight $\beta(t)$ in real-time.

Overview of the DSD derivation (a) and the PI control feedback loop (b).

Experimental Setup

The effectiveness of cDSD was evaluated on the WMT 2014 English-German (En-De) and English-French (En-Fr) datasets, containing 4.5M and 39M sentence pairs, respectively. The loss function was tested across three major architectures: RNN-based (RNNSearch), CNN-based (ConvS2S), and the Transformer-big model.

Results and Discussion

Experimental results indicate that cDSD consistently improves translation quality across all tested architectures. On the En-De task, the cDSD-enhanced Transformer-big reached 28.64 BLEU, while the En-Fr model reached 42.00 BLEU. RNN-based models also saw significant gains, achieving 22.60 BLEU compared to a 22.13 BLEU baseline.

Escaping Local Optima

A key observation is the "simulated annealing" effect observed when transitioning from standard MLE to DSD loss. As illustrated in Figure 4, switching to the DSD loss mid-training causes a temporary spike in training loss. This perturbation allows the model to "jump" out of local optima and eventually settle into a superior global optimum, resulting in higher BLEU scores.

Training curves illustrating the 'simulated annealing' effect when switching to DSD loss.

Furthermore, the gains from cDSD are robust across different decoding strategies. While the improvements are most pronounced during greedy search—where the model is most prone to cumulative errors—the performance gains persist even with large beam sizes. This suggests that the model has learned fundamentally more robust underlying representations.

Conclusion

The Controllable Dual Skew Divergence loss offers a robust alternative to standard MLE for NMT. By combining symmetric divergence with automated control theory, the method effectively addresses overgeneralization and exposure bias. The success of the PI controller suggests that automated feedback loops can effectively manage the sensitivity of complex loss functions in deep learning. Future work may extend this framework to other sequence generation tasks, such as text summarization or image captioning.

Summary updated

BibTeX
@misc{xiao2019dual,
  author = {Fengshun Xiao and Yingting Wu and Hai Zhao and Rui Wang and Shu Jiang},
  title = {{Dual Skew Divergence Loss for Neural Machine Translation}},
  year = {2019},
  eprint = {1908.08399},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1908.08399},
}
Figure