Shiftable Context: Addressing Training-Inference Context Mismatch in Simultaneous Speech Translation

Matthew Raffel, Drew Penney, Lizhong Chen

Introduction

Simultaneous Speech-to-Text Translation (SimulST) is a challenging task that requires a model to generate translations in real-time while the speaker is still talking. To achieve this, state-of-the-art systems often employ segment-based architectures like the Augmented Memory Transformer (AMT). These models process the audio stream in discrete segments, typically consisting of a "center" chunk (the current audio being translated) flanked by "left" and "right" contexts that provide historical and future information, respectively.

However, a significant performance bottleneck exists due to the training-inference context mismatch. During training, models are optimized using perfectly sized, fixed blocks of data. In real-world inference, audio arrives in unpredictable, partial chunks. When a chunk does not perfectly fill a model's expected segment size, the system is forced to process "partially filled" blocks. This discrepancy leads to a sharp decline in translation quality, particularly at the beginning of sentences where context is most limited.

The Shiftable Context Mechanism

To bridge this gap without requiring expensive model retraining, this research introduces Shiftable Context. This suite of algorithmic adjustments redefines how data is fed into the encoder during inference, ensuring the model always sees the input dimensions it was trained to expect. The approach consists of three primary techniques:

1. Shiftable Center Context

In scenarios where the current "center" chunk is not yet full, the system pulls additional tokens from the previous segment’s left context to fill the remaining slots. By ensuring the self-attention mechanism operates on a full-sized block, the model maintains the structural consistency it learned during training.

2. Shiftable Right Context

At the end of a speech sequence, the "right" (future) context slots are often empty. Shiftable Right Context repurposes these empty slots as additional "left" context. Instead of processing padding or null values, the model is given more historical data to refine its final translation outputs.

3. Shiftable Left Context

This technique addresses the "cold start" problem. The very first segment of a sentence lacks historical context (left context). Shiftable Left Context moves these empty historical slots to the "right," allowing the model to look further ahead into the future for the crucial first segment. This extra look-ahead helps stabilize the initial translation, which is vital since early errors often propagate through the decoder.

Experimental Evaluation

The researchers evaluated Shiftable Context using the MuST-C dataset, a standard multilingual benchmark derived from TED talks. They focused on three language pairs: English-to-German (en-de), English-to-French (en-fr), and English-to-Spanish (en-es). Performance was measured using the SimulEval toolkit, tracking both translation accuracy (BLEU score) and latency (Average Lagging).

Key Results

  • Significant Accuracy Gains: The application of Shiftable Context to the AMT model resulted in substantial improvements across all tested languages. The average BLEU score increased by 2.09 for en-de, 1.83 for en-fr, and 1.95 for en-es.
  • Minimal Latency Impact: Despite the dynamic data shuffling, the impact on computation-aware Average Lagging was negligible, ranging from only 0.05 to 0.1 seconds. This is a minor trade-off compared to the standard 2-3 second delay inherent in simultaneous systems.
  • Ablation Insights: Component testing revealed that "Shiftable Center" provided the most significant individual boost (averaging 1.10 BLEU). However, the three techniques are complementary; the highest performance is achieved when all three are used in tandem.

Discussion and Insights

The core finding of this work is that model performance in SimulST is heavily dependent on input alignment. The model's effectiveness is not solely a function of the amount of data it receives, but how closely that data matches the shapes and structures encountered during training. By shifting data from the past or future to fill empty slots, the system prevents the encoder from becoming "confused" by partial inputs.

Furthermore, the improvements were most pronounced at lower wait-k values. This indicates that Shiftable Context is particularly effective in high-pressure, low-latency scenarios where the training-inference mismatch is most frequent and damaging.

Conclusion and Future Work

Shiftable Context provides a robust, training-free solution to a fundamental problem in simultaneous speech translation. By remapping context slots to maintain consistency, it significantly improves translation quality with almost no latency penalty.

While currently optimized for the Augmented Memory Transformer, the underlying logic is likely applicable to other segment-based models such as Transformer-XL or Emformer. Future research may also explore the application of these techniques to Streaming Automatic Speech Recognition (ASR) and evaluate their performance in noisy, real-world audio environments.

Summary updated

BibTeX
@inproceedings{raffel2023shiftable,
  author = {Matthew Raffel and Drew Penney and Lizhong Chen},
  title = {{Shiftable Context: Addressing Training-Inference Context Mismatch in Simultaneous Speech Translation}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=mlsNi1IDjY},
}
Figure