Integrated Training for Sequence-to-Sequence Models Using Non-Autoregressive Transformer

Evgeniia Tokarchuk, Jan Rosendahl, Weiyue Wang, Pavel Petrushkov, Tomer Lancewicki, Shahram Khadivi, Hermann Ney

TL;DR

This paper introduces a novel approach to integrate cascaded machine translation models (like speech-to-translation) into a single, end-to-end trainable system using a non-autoregressive Transformer. This method overcomes common issues like error propagation and the inability to leverage direct end-to-end training data, achieving improved translation quality.

What Problem Does This Paper Address?

Many complex natural language tasks, such as speech translation or pivot translation (translating from language A to language C via an intermediate language B), traditionally rely on a series of independently trained models. This "cascaded" approach, while modular, suffers from significant drawbacks:

  • Error Propagation: Errors made by an early model in the chain can be amplified by subsequent models, leading to a compounding effect on the final output quality.
  • Information Loss: Intermediate representations between models are often "surface forms" (e.g., discrete text), losing richer contextual information that the models might have learned.
  • Limited Training Data Utilization: Crucially, these cascaded systems cannot directly use end-to-end training data (e.g., direct A-to-C translations) which is often the most relevant and abundant. Instead, they rely on separate datasets for each individual step (A-to-B and B-to-C).

Previous attempts at integrated training often required specialized "three-way" data (A-to-B, B-to-C, and A-to-C), which is not always available. This paper aims to bridge this gap by enabling end-to-end training for cascaded models without needing explicit intermediate representations or specialized data.

Methods

The core innovation lies in integrating two sequence-to-sequence models (specifically, Transformers) in a cascaded setup (e.g., src→piv and piv→trg) into a single, end-to-end trainable architecture. The key is a differentiable interface that connects the output of the first model (src→piv) to the input of the second (piv→trg), allowing gradients to flow back during training.

The authors propose two interface types:

  1. Decoder States Interface: The final hidden states from the decoder of the first model are passed directly as input to the encoder of the second model.
  2. Decoder Posteriors Interface: The probability distribution over possible intermediate (pivot) sequences from the first model is used to create a "soft embedding" for the second model's encoder.

Crucially, to avoid the need for explicit pivot sequences during end-to-end training (which would require synthetic data or search), the authors propose replacing the autoregressive src→piv model with a non-autoregressive Transformer (NAT). NATs generate all target tokens in parallel, allowing the pivot sequence to be represented as a sequence of "unknowns" during end-to-end training, thus enabling direct use of src→trg data.

The overall training strategy involves:

  1. Pre-training: Train the src→piv and piv→trg models independently on their respective datasets.
  2. Concatenation: Connect the pre-trained models through one of the proposed interfaces and initialize the integrated model with the pre-trained weights.
  3. Fine-tuning: Fine-tune the entire integrated model on the direct src→trg data.

Datasets

The experiments were conducted on two pivot-based machine translation tasks:

  • French → German: Utilized the Europarl corpus (v7), CommonCrawl, and newstest2008-2010, totaling 2.3 million parallel sentences for direct training. Pre-training data included French-English (905M words) and English-German (221M words).
  • German → Czech: Used NewsCommentary (v14), newssyscomb2009, and previous years' test sets, totaling 230,000 parallel sentences for direct training. Pre-training data included German-English (180M words) and English-Czech (486M words).

Newstest2011 was used as the development set, and newstest2012 as the test set for both tasks.

Key Insights and Ideas

  • NAT is Key for End-to-End Integration: Replacing the autoregressive intermediate model with a non-autoregressive Transformer is a critical step. It allows the model to learn from direct src→trg data by treating the intermediate pivot sequence as a sequence of unknowns during training, bypassing the need for explicit intermediate outputs.
  • Differentiable Interfaces Enable Gradient Flow: The proposed "Decoder States" and "Decoder Posteriors" interfaces are designed to be differentiable, enabling end-to-end training through gradient backpropagation, a fundamental requirement for deep learning models.
  • Pre-training is Crucial: The experiments strongly suggest that initializing the cascaded models with weights from independently pre-trained models is essential for successful end-to-end training. Without it, performance is severely degraded or training fails.
  • Error Dampening Effect: The piv→trg model can actually mitigate some of the errors from the src→piv model, suggesting that the integrated system is more robust than a simple cascaded pipeline.

Key Results

  • French → German: The proposed NAT-based integrated model achieved improvements of up to 2.1% BLEU over the cascaded baseline. The "Decoder States w/ Encoderp2t" interface performed best, reaching 22.8% BLEU on the test set.
  • German → Czech: The results were more mixed. The integrated model showed a degradation of up to 2.3% BLEU compared to the pivot baseline. The authors attribute this to the smaller training data size for this language pair, suggesting a minimum amount of direct src→trg data is needed for acceptable performance.
  • Error Impact: When simulating errors in the src→piv model, the cascaded src→trg system showed a drop of only about 0.5 BLEU for a 1.0 BLEU drop in the src→piv system, indicating error dampening.
  • Improving src→piv Quality: Improving the src→piv model's performance by 6.2% BLEU only led to a 1.4% BLEU improvement in the cascaded system, suggesting the piv→trg model can also be a bottleneck.

Limitations and Future Work

  • Data Dependency: The German→Czech results highlight that the integrated model's performance is sensitive to the amount of direct src→trg training data. More data is needed for smaller language pairs.
  • Length Modeling: Length modeling for NAT decoders remains a bottleneck. The current approach of fixing the pivot sequence length to the source sequence length is a simplification that could be improved with more sophisticated length prediction methods.
  • Decoder Iterations: While iterative refinement is beneficial for standalone NAT models, it did not directly translate to improvements in the integrated model, possibly due to mismatches between training and decoding or issues with gradient propagation. Future work could explore techniques like Gumbel-Softmax for iterative training.
  • Knowledge Distillation: While beneficial for standalone NAT models, knowledge distillation showed a slight degradation in the integrated model, requiring further investigation.

The authors suggest that their architecture is generalizable to any cascaded sequence-to-sequence model and that future work should focus on incorporating advanced NAT techniques and exploring more sophisticated length modeling.

Summary updated

BibTeX
@inproceedings{tokarchuk2021integrated,
  author = {Evgeniia Tokarchuk and Jan Rosendahl and Weiyue Wang and Pavel Petrushkov and Tomer Lancewicki and Shahram Khadivi and Hermann Ney},
  title = {{Integrated Training for Sequence-to-Sequence Models Using Non-Autoregressive Transformer}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
}
Figure