NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Semantic Label Smoothing for Sequence to Sequence Problems

Michal Lukasik, Himanshu Jain, Aditya Krishna Menon, Seungyeon Kim, Srinadh Bhojanapalli, Felix X. Yu, Sanjiv Kumar

Abstract: Michal Lukasik, Himanshu Jain, Aditya Menon, Seungyeon Kim, Srinadh Bhojanapalli, Felix Yu, Sanjiv Kumar. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).

2020.

Introduction

Label smoothing (LS) is a well-established regularization technique used to prevent neural networks from becoming overconfident in their predictions. By redistributing probability mass from the ground-truth label to other classes, LS helps models generalize better and improves robustness against noisy data.

However, applying LS to sequence-to-sequence (seq2seq) tasks, such as machine translation, is notoriously difficult. Unlike standard classification where the label space is fixed, the "label space" in seq2seq is the set of all possible sentences, which is effectively infinite. Most existing approaches rely on token-level smoothing—treating words independently and ignoring grammar—or sequence-level methods that generate synthetic noise by randomly swapping words. These often result in ungrammatical gibberish that can degrade a model's understanding of language structure.

Semantic Label Smoothing

This paper introduces Semantic Label Smoothing (SLS), a method that regularizes models using a curated set of semantically similar, well-formed sentences retrieved from a corpus. Instead of relying on random noise, the authors propose a two-stage retrieval process to find high-quality "semantic neighbors" for any given target sentence:

  1. Semantic Retrieval: A pre-trained BERT model embeds a large corpus of valid sentences into a vector space. For a target sentence, the system identifies the $k$ nearest neighbors in this embedding space to ensure topical relevance.
  2. Structural Reranking (BLEU Pruning): To ensure the retrieved sentences also share structural similarities, the candidates are reranked using BLEU scores (measuring n-gram overlap). The top $k'$ candidates are selected.
Examples of original target sentences and their retrieved semantic neighbors used for smoothing.

By training the model to assign some probability to these plausible alternative translations, the model learns from high-quality linguistic data even when it is looking at "incorrect" labels. This approach balances semantic similarity with structural relevance, finding a "sweet spot" of plausible paraphrases.

Experimental Results

The researchers evaluated Semantic Label Smoothing on three standard Machine Translation benchmarks: English-German (EN-DE), English-Czech (EN-CS), and English-French (EN-FR).

As shown in the results below, the BERT+BLEU4 configuration consistently outperformed standard baselines, including the base Transformer and previous state-of-the-art sequence-level smoothing methods.

Performance comparison of BERT+BLEU4 against various baselines across three language pairs.

Key Findings

  • Performance Gains: On the EN-CS task, the method achieved a BLEU4 score of 22.82, a significant improvement over the base Transformer (21.19) and the previous best sequence-level smoothing method (20.94).
  • Metric Robustness: Improvements were not limited to BLEU scores; the method showed gains across METEOR, ROUGE, and CIDEr, indicating higher overall translation quality.
  • The Importance of Well-formedness: The primary insight is that smoothing is most effective when the "noise" consists of valid, grammatical sentences. Retrieving from a human-written corpus ensures the model is always exposed to high-quality language structure.

Conclusion and Future Work

Semantic Label Smoothing provides a robust framework for regularizing seq2seq models by leveraging the semantic and structural relationships between sentences. While the method introduces some computational overhead due to the nearest-neighbor retrieval step, the gains in translation quality and model robustness are substantial. Future research directions include applying this technique to other complex output tasks like text summarization and exploring its interaction with various data augmentation strategies.

Summary updated

BibTeX
@inproceedings{lukasik2020semantic,
  author = {Michal Lukasik and Himanshu Jain and Aditya Krishna Menon and Seungyeon Kim and Srinadh Bhojanapalli and Felix X. Yu and Sanjiv Kumar},
  title = {{Semantic Label Smoothing for Sequence to Sequence Problems}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  url = {https://openreview.net/forum?id=o_cqM2R6zj-},
}
Figure