SelfSeg: A Self-supervised Sub-word Segmentation Method for Neural Machine Translation

Haiyue Song, Raj Dabre, Chenhui Chu, Sadao Kurohashi, Eiichiro SumitaarXiv 2023 · DOI

TL;DR

SelfSeg is a self-supervised sub-word segmentation method that trains on simple monolingual dictionaries rather than expensive parallel corpora. It achieves significant translation quality gains—up to 4.3 BLEU points in low-resource settings—while being nearly 37x faster at decoding than previous state-of-the-art neural segmenters.

What Problem Does This Paper Address?

Neural Machine Translation (NMT) models struggle with "out-of-vocabulary" (OOV) words—terms they haven't seen during training. To fix this, we use sub-word segmentation to break rare words into smaller, known pieces (e.g., "unfriendly" becomes "un + friend + ly").

While the industry standard, Byte-Pair Encoding (BPE), is fast, it is a simple greedy algorithm not optimized for the translation task. Recent neural alternatives like Dynamic Programming Encoding (DPE) perform better but come with a heavy price: they require massive parallel corpora to train, take days to converge, and are slow during inference. The authors of SelfSeg set out to create a neural segmenter that offers the performance of DPE with the efficiency and data-light requirements of BPE.

Methods

The core innovation of SelfSeg is treating segmentation as a self-supervised task performed at the word level rather than the sentence level.

  1. Word-Level Training: The authors argue that sub-word segmentation is "context-agnostic." As shown in Figure 1, the word "watching" should be segmented the same way regardless of the surrounding sentence. This allows the model to train on unique words from a monolingual dictionary, drastically reducing the amount of data processed.
Fig. 1. Segmentation is a self-contained task where context information is not required.
  1. charMASS Masking: To train the model without labels, they use a strategy called charMASS. They take a word, mask a consecutive span of characters, and task a Transformer-based encoder-decoder to predict the original word.
  2. Dynamic Programming (DP): During training, the model maximizes the probability of a word by summing the probabilities of all possible segmentations. During decoding, it uses a DP algorithm to efficiently find the single "best" segmentation (the Maximum A Posteriori path).
The training and decoding steps for sub-word segmentation.
  1. Regularization: The authors introduce a "SelfSeg-Regularization" mechanism. Instead of always picking the best split, the model can sample multiple different segmentations for the same word during training, which makes the downstream NMT model more robust.

Datasets

The researchers evaluated SelfSeg across a wide range of resource scenarios:

  • Low-Resource: The Asian Language Treebank (ALT) dataset, covering languages like Filipino, Indonesian, Japanese, Malay, Vietnamese, and Chinese.
  • Middle-Resource: IWSLT15 (Vietnamese-English), WMT16 (Romanian-English), and WMT15 (Finnish-English).
  • High-Resource: WMT14 (German-English and French-English).

Key Insights and Ideas

  • Context is Overrated for Segmentation: The most significant "aha moment" is the empirical proof that sentence-level context doesn't significantly change how words are segmented for NMT. Moving to word-level data is the primary driver for SelfSeg's massive speedup.
  • Monolingual Data is Enough: By using self-supervision (masking), the model learns the internal structure of a language's morphology without needing a single translated sentence. This makes it incredibly useful for low-resource languages where parallel data is scarce.
  • Frequency Normalization Matters: Training on raw word frequencies is inefficient because common words like "the" dominate the loss. The authors found that reducing the frequency of common words (using a "Threshold" or "Log" strategy) helps the model focus on learning how to segment complex, rare words.

Key Results

SelfSeg consistently outperformed BPE and matched or beat DPE while being significantly more efficient.

  • Translation Quality: On the low-resource ALT dataset, SelfSeg improved BLEU scores by 1.2 points over BPE. When the regularization mechanism was added, the gain jumped to 4.3 BLEU points.
  • Massive Speedup: Compared to DPE, SelfSeg is 17.8x faster to train and up to 36.8x faster to decode in high-resource scenarios. This is because SelfSeg only needs to decode each unique word once, whereas DPE must process every word every time it appears in a sentence.
The training and decoding speeds of BPE, DPE, and SelfSeg methods on two datasets.
  • Qualitative Improvements: Case studies showed that SelfSeg produces more linguistically intuitive segments (e.g., "refer + ee + s") compared to BPE's often arbitrary splits (e.g., "refere + es").

Limitations and Future Work

  • Diminishing Returns in High-Resource Settings: On massive datasets like WMT14 (French-English), the performance gap between all segmentation methods narrows. The authors note that the benefits of advanced segmentation are most pronounced when data is limited.
  • Vocabulary Initialization: SelfSeg still relies on BPE to generate the initial sub-word vocabulary. Future work could involve joint training of the vocabulary and the segmenter.
  • Multilingual Expansion: The current model is trained per language. The authors suggest extending this to a single multilingual segmenter that could handle dozens of languages simultaneously.

Summary updated

BibTeX
@misc{song2023selfseg,
  author = {Haiyue Song and Raj Dabre and Chenhui Chu and Sadao Kurohashi and Eiichiro Sumita},
  title = {{SelfSeg: A Self-supervised Sub-word Segmentation Method for Neural Machine Translation}},
  year = {2023},
  eprint = {2307.16400},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.16400},
}
Figure