Sentence-Wise Smooth Regularization for Sequence to Sequence Learning

ChengYue Gong, Xu Tan, Di He, Tao Qin

Abstract

Standard training for sequence-to-sequence (Seq2Seq) models via Maximum Likelihood Estimation (MLE) often results in "jittery" confidence distributions across a sentence. This paper identifies a strong correlation between per-token probability smoothness and translation quality. We propose a sentence-wise smooth regularization term that reallocates optimization effort from high-confidence tokens to "weak links," leading to significant improvements in BLEU scores across multiple benchmarks, including machine translation and text summarization.

The Problem: Non-Smoothness in Seq2Seq Training

Most Seq2Seq models are trained using Maximum Likelihood Estimation (MLE), which treats the generation of each word as an independent classification task. While effective, this approach produces "non-smooth" probability distributions. Within a single generated sentence, some tokens may have a prediction probability of 0.99, while others drop to 0.05.

These low-probability tokens act as a "weakest link," causing the model to veer off track during beam search or inference. Interestingly, these low-confidence spots are not just rare words; analysis shows that common parts of speech, such as nouns, pronouns, and determiners, are frequently the points where the model loses confidence.

Smoothness as a Proxy for Quality

The authors discovered a striking empirical correlation: for two sentences with the same total loss value, the one with smoother, more consistent per-token probabilities almost always results in a higher quality output (higher BLEU score). This suggests that minimizing the variance of prediction probabilities across a sequence is as important as minimizing the total loss itself.

Figure 2: (a) Correlation between BLEU score and probability variance across different loss ranges. (b) Frequency of low-confidence tokens categorized by word popularity and POS tags.

Proposed Method: Sentence-Wise Smooth Regularization

To address this, the paper introduces a new loss function, $L_{smo}$, which adds a novel regularization term to the standard MLE loss. This term is built on two core principles:

  1. Prediction Saturation (PS): Once a word is predicted with high confidence (e.g., > 0.9), the model should stop focusing optimization effort on it.
  2. Wooden Barrel (WB): Much like a barrel's capacity is limited by its shortest stave, a sentence's quality is limited by its lowest-probability token. The loss function specifically targets these "short staves."

The algorithm uses a sliding window to calculate local smoothness. It applies a penalty based on the difference between adjacent probabilities, weighted by the minimum probability within that window. This forces the model to focus its learning on difficult, low-confidence segments of the sentence.

Experimental Results

The researchers evaluated their method on high-standard benchmarks including WMT14 English-German, WMT17 Chinese-English, and IWSLT14 German-English. The "Smooth" regularization consistently outperformed both standard MLE and Curriculum Learning baselines.

Table 1: Performance comparison of the proposed Transformer+Smooth method against various state-of-the-art baselines across three translation datasets.

Key results include:

  • WMT14 En-De: Achieved a BLEU score of 29.01 (Transformer Big), a +0.61 improvement over the baseline.
  • IWSLT14 De-En: Saw a significant jump from 32.20 to 33.47 BLEU.
  • Summarization: Improved ROUGE-L scores by nearly 1.0 point on the Gigaword corpus.

Conclusion

Sentence-wise smooth regularization offers a robust way to improve Seq2Seq models by ensuring balanced confidence across generated sequences. By reallocating gradient updates from "saturated" tokens to "weak links," the method creates more robust models that perform better during complex inference tasks like beam search. While it introduces new hyperparameters, the consistent gains across diverse datasets demonstrate its effectiveness as a general-purpose regularization technique for sequence learning.

Summary updated

BibTeX
@inproceedings{gong2019sentence,
  author = {ChengYue Gong and Xu Tan and Di He and Tao Qin},
  title = {{Sentence-Wise Smooth Regularization for Sequence to Sequence Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33016449},
}
Figure