Segmentation-Free Streaming Machine Translation

Javier Iranzo-Sánchez, Jorge Iranzo-Sánchez, Adrià Giménez, Jorge Civera, Alfons JuanarXiv 2023

TL;DR

Traditional streaming machine translation relies on a separate tool to chop continuous speech into sentences before translating, which often introduces irreversible errors. This paper introduces a Segmentation-Free (SegFree) framework that allows the translation model to process a continuous, unsegmented stream of text and dynamically decide its own boundaries. By delaying the segmentation decision until after the translation is generated, SegFree eliminates the upstream bottleneck and significantly improves the quality-latency trade-off.

What Problem Does This Paper Address?

Streaming Machine Translation (STR-MT) is critical for real-time applications like live captioning, international conferences, and speech-to-speech translation. Typically, these systems operate in a cascade: an Automatic Speech Recognition (ASR) system transcribes speech, an independent segmenter breaks the continuous text into sentence-like units, and a Machine Translation (MT) model translates each unit in isolation.

The core flaw in this setup is that the segmenter makes a "hard" decision early on without any awareness of what the translation model actually needs or intends to produce. If the segmenter cuts a sentence too early or too late, the error cascades downstream, severely damaging translation quality. This is particularly problematic when feeding into a downstream Text-to-Speech (TTS) system, where spoken outputs cannot be retracted or corrected once sent to the user.

Methods

The authors propose SegFree, a framework that completely removes the upstream segmenter. Instead, the MT model directly consumes an unsegmented stream of source text. It signals the end of a translated segment by emitting a special token, [SEP], directly into the target translation stream.

To prevent the model's context window from overflowing during an hours-long live session, the authors introduce a probabilistic memory mechanism to manage a "streaming history."

Figure 1: This figure illustrates the memory mechanism in three consecutive steps shown by rows. The chunks with shaded color belong to the streaming history, while the unshaded chunks are the current active source (top) and target (bottom) streams. In the first row (t = i), the MT system has just generated the last target word yi = “duda”. In the second row (t = i + 1), the translation model generates the "[SEP]" token, which indicates the end of a target segment. At that point, the memory mechanism is activated and decides ˆa = j + 5 with xˆa = “that”, so "there is no doubt about that" is moved to the streaming history along with the current translation. In the third row, the translation continues, but the streaming history has grown too large, so the memory mechanism discards the oldest chunk.

As shown in Figure 1, when the model emits [SEP], a log-linear model evaluates the active source text to determine exactly how much of it has been successfully translated. This decision is guided by two main features:

  1. Reverse Translation Model (Reverse MT): Scores how likely the source chunk is given the generated translation prefix.
  2. Linear Regression (LinReg): Smooths the probabilities by predicting source length based on target length using Ordinary Least Squares.

Once the boundary is chosen, the translated source and target segments are moved to a history buffer, freeing up the active sliding window for incoming text.

Datasets

The authors evaluated their approach across four translation directions: English to/from German, Spanish, and French. They utilized several standard corpora, augmenting document-level data to simulate streaming histories:

Overview of datasets used for training.
  • IWSLT 2022 Shared Tasks: News-commentary v16, Tilde-Rapid, MuST-C v2, and Europarl-ST.
  • OPUS NLPL: Large-scale open data including ParaCrawl, CommonCrawl, WikiTitles, WikiMatrix, and LibriVox (detailed in Figure 5).

Key Insights and Ideas

  • Flipping the Pipeline: Moving the segmentation decision from the source side (upstream) to the target side (downstream) allows the system to utilize rich target-side context. The model decides where a sentence ends based on what it has already translated.
  • Dynamic Synchronization over Fixed Windows: Naive streaming approaches use fixed-offset sliding windows. However, because translation rates fluctuate (some words have high fertility and translate into multiple words), fixed windows quickly fall out of sync. A probabilistic memory mechanism dynamically adapts to the content.
  • Simplifying the Architecture: By integrating segmentation directly into the MT model, developers no longer need to train, tune, and maintain separate, complex upstream segmenter models (such as fine-tuned XLM-RoBERTa classifiers).

Key Results

The SegFree framework was compared against a highly optimized baseline using a state-of-the-art DS-RoBERTa segmenter.

Figure 6: Comparison of BLEU vs. AL between the proposed SegFree approach and the baseline models on the English to German Europarl-ST dev set. For the WindowRetrans models, each point corresponds to a different r ∈{0.1, 0.2, . . . , 0.7}.
  • Superior Quality-Latency Trade-off: As shown in Figure 4, SegFree consistently outperformed the DS-RoBERTa systems at medium and high latencies across six out of seven test sets.
  • BLEU Score Gains: On the English-to-German Europarl-ST test set, SegFree achieved a gain of up to 2.6 BLEU points over the best performing direct segmentation baseline.
  • Approaching Oracle Performance: In the German-to-English translation task, SegFree performed so efficiently that it was statistically indistinguishable from an Oracle segmenter (a theoretical upper bound using perfect human sentence boundaries) at higher latencies.

Limitations and Future Work

  • Static Policies: The current implementation relies on a fixed wait-k policy to control translation latency. The authors note that integrating adaptive or dynamic translation policies could further optimize when the model chooses to read or write.
  • Low-Latency Gaps: At very low latencies, traditional segmenters that utilize a small lookahead window still hold a slight edge when evaluated on computationally-aware metrics like Translation Lag (TL).
  • Untapped Feature Potential: While Reverse MT and LinReg proved effective, the log-linear framework allows for any arbitrary feature function to be integrated into the memory mechanism, leaving room for further optimization.

Summary updated

BibTeX
@misc{iranzosanchez2023segmentation,
  author = {Javier Iranzo-Sánchez and Jorge Iranzo-Sánchez and Adrià Giménez and Jorge Civera and Alfons Juan},
  title = {{Segmentation-Free Streaming Machine Translation}},
  year = {2023},
  eprint = {2309.14823},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.14823},
}
Figure