Abstract
Neural Machine Translation (NMT) models typically generate sequences in a unidirectional, auto-regressive manner, which often leads to error propagation where early mistakes degrade the quality of subsequent tokens. While bidirectional ensembles can mitigate this, they are computationally expensive. We present an efficient bidirectional NMT framework that trains a single Transformer model to translate in both left-to-right (L2R) and right-to-left (R2L) directions simultaneously. By utilizing directional start tokens and a joint loss function, our approach achieves state-of-the-art BLEU scores while requiring 50% fewer parameters and 40% less training time than traditional bidirectional ensembles.
Introduction
The Transformer architecture has revolutionized Neural Machine Translation, yet it remains susceptible to the fundamental challenge of auto-regressive generation: error propagation. As a model generates a sentence token by token, any early inaccuracy is compounded, leading to a significant drop in translation quality towards the end of the sequence. Researchers from Microsoft and Sun Yat-sen University have proposed a novel architectural tweak that allows a single set of weights to master both translation directions, providing the benefits of bidirectional modeling without the typical computational burden.
The Challenge: Error Propagation
In standard NMT, the beginning of a translated sentence is statistically more accurate than the end. Empirical studies show that in a baseline Transformer, the accuracy of the first four tokens is approximately 39%, whereas the accuracy for the final four tokens drops to 28.1%. While ensembling two separate models (one L2R and one R2L) can address this, it doubles the parameter count and significantly increases training and inference latency. The goal of this work is to achieve similar or better performance within a single, efficient model.
Efficient Bidirectional NMT Framework
The core of the proposed method is the ability of a single encoder-decoder pair to handle bidirectional dependencies through four primary mechanisms:
- Directional Start Tokens: Instead of a universal start-of-sentence (
<SOS>) token, the model learns two distinct embeddings: one for L2R and one for R2L. This acts as a switch, signaling the decoder which direction to follow. - Joint Training: During training, the model is optimized on both the original target sequence $(x, y)$ and its reverse $(x, y_{rev})$. The joint loss function balances the log-likelihoods of both directions, encouraging the model to learn a unified representation.
- Bidirectional Inference and Re-scoring: At test time, the model performs beam search in both directions to generate candidate translations. These candidates are then re-scored using a unified probability that considers the likelihood of the sequence in both directions, allowing the strong beginning of one pass to correct the weak end of the other.
- Parameter Sharing: By using the same weights for both directions, the model benefits from a form of multi-task regularization, leading to more robust linguistic features.
Experimental Results
The authors evaluated their framework on three major benchmarks: WMT14 English-German (En→De), WMT17 Chinese-English (Zh→En), and IWSLT14 German-English (De→En).
As shown in the results, the proposed method achieved a 29.30 BLEU score on WMT14 En→De, outperforming the "Transformer Big" baseline (28.40) and setting a new benchmark. This performance is achieved with 50% fewer parameters than a standard ensemble and a 40% reduction in training time.
Analysis and Robustness
Ablation studies were conducted to understand the impact of model depth and decoding parameters. The bidirectional framework consistently improves upon the baseline across different numbers of decoder layers, demonstrating that the gains are not merely due to increased capacity but rather the more effective use of existing parameters.
Furthermore, the model exhibits high efficiency during inference. While bidirectional re-scoring adds a roughly 10% overhead compared to unidirectional decoding, it remains significantly faster than running two separate models. Interestingly, the model trained bidirectionally performs as well as a standard model even when using only the L2R path at inference, proving that the bidirectional training objective enhances rather than confuses the underlying weights.
Conclusion
This paper presents a highly efficient approach to bidirectional NMT. By integrating both translation directions into a single Transformer model, the authors successfully mitigate error propagation while maintaining a low computational footprint. This framework offers a practical alternative to expensive ensemble methods and opens new avenues for applying bidirectional training to other sequence generation tasks.
Summary updated