Introduction
In the field of Machine Translation (MT), the transition from offline processing to real-time streaming presents a significant technical hurdle. While traditional MT models benefit from having access to a complete source sentence before generating a translation, streaming systems must operate on a rolling window of audio input. This paper from Meta’s research team addresses the complexities of implementing high-quality beam search within cascaded, real-time speech translation systems—a task often avoided in favor of simpler, but less accurate, greedy decoding.
The Streaming "Minefield"
Streaming speech translation typically follows a cascaded architecture: Automatic Speech Recognition (ASR) converts audio to text, which is then passed to an MT model. Implementing beam search—the gold standard for translation quality—in this pipeline is notoriously difficult due to three primary factors:
- Unstable Input: ASR systems are non-monotonic and often revise previous outputs as more acoustic context becomes available (e.g., correcting "car" to "carpet").
- Asynchronous States: In a beam search, different translation hypotheses may require different amounts of source context. Managing these varying "read" and "write" states simultaneously is computationally complex.
- Latency vs. Stability: Real-time users require low latency and a stable display. However, beam search can lead to "flicker," where the displayed text changes rapidly as the model explores and eventually rejects different paths in the beam.
Methodology
The researchers utilized a Simultaneous MT model based on Monotonic Infinite Look-back (MILK) attention. Their approach focuses on several key optimizations to make beam search viable for streaming:
Grouped Processing and State Management
To manage hypotheses of varying lengths, the system processes them in groups that have consumed the same number of input tokens. The model continues "WRITE" operations until all top-$k$ hypotheses signal a need for more input ("READ"). To maintain efficiency, the team implemented KV-caching, storing keys and values from Transformer layers to prevent the $O(T^2)$ computational explosion associated with re-translating the entire history every time a new audio chunk arrives.
Stability and Emission Logic
To combat the issue of flicker, the authors introduced a "Smart Emission" strategy. A translation segment is only marked as "final" if it constitutes a common prefix shared by all $k$ hypotheses in the beam. If the hypotheses disagree, the output remains in an "intermediate" state, visible to the system but subject to change. Additionally, the system treats ASR outputs that do not end in punctuation or a space as incomplete, preventing the MT model from committing to a translation based on a partial word.
Scoring Metrics
The team found that raw probabilities were insufficient for comparing hypotheses of different lengths. Instead, they utilized length-normalized token probabilities as the primary scoring metric, using the MILK architecture's signals solely to determine the timing of the "WRITE" operations rather than as a component of the beam score.
Experimental Results
The proposed system was evaluated using an internal English-Spanish dataset and real-life conversational recordings. The streaming beam search (with a beam size of 3) demonstrated significant improvements over the standard greedy search baseline:
- Translation Quality: Achieved a 1-point BLEU score increase over greedy decoding.
- Computational Efficiency: Reduced CPU usage by 40% compared to "repeated re-translation" baselines, making the system suitable for power-constrained devices like wearables.
- User Experience: Reduced character flicker by over 20%. While greedy search has zero flicker, it suffers from lower quality; this beam search approach identifies a "sweet spot" that balances stability with high-fidelity translation.
- Latency: The system maintained a low "word average lag," ensuring the translation remained synchronized with the speaker's voice.
Conclusion and Future Work
This research demonstrates that beam search is not only possible but highly beneficial for streaming speech translation when managed with appropriate state and stability heuristics. While the current implementation faces challenges in batching the decoder side, future work may explore LSTMs or more rigorous "write" probabilities to enable true Maximum-A-Posteriori (MAP) decoding. Furthermore, while this study focused on English-Spanish, the researchers aim to expand the framework to more linguistically diverse language pairs in the future.
Summary updated