Neural Machine Translation with Joint Representation

Yanyang Li, Qiang Wang, Tong Xiao, Tongran Liu, Jingbo Zhu

This paper presents a novel architecture for Neural Machine Translation (NMT) called Reformer, which moves away from the traditional encoder-decoder paradigm in favor of a unified Joint Representation space. By utilizing a new "Separable Attention" mechanism, the authors demonstrate that modeling the full interaction between every source and target token pair can lead to better translation quality with significantly fewer parameters than standard Transformers.

TL;DR

The Reformer architecture replaces the standard encoder-decoder framework with a single joint representation space ($S \times T \times H$) to fully capture source-target interactions. Using a novel Separable Attention mechanism to maintain efficiency, the model outperforms Transformer baselines by up to 1.9 BLEU points and achieves state-of-the-art results with 50% fewer parameters.

What Problem Does This Paper Address?

Modern NMT systems, primarily based on the Transformer, use an encoder-decoder framework where attention mechanisms partially encode interactions between source and target sequences. While efficient, this approach doesn't explicitly model the full Cartesian product of all source and target units—a concept that was central to the success of older Statistical Machine Translation (SMT) alignment models.

Directly modeling this "Joint Representation" space (size $S \times T \times H$, where $S$ and $T$ are sentence lengths and $H$ is hidden size) is typically computationally prohibitive, as standard self-attention would scale quadratically with the product of the lengths ($O(S^2 T^2)$). The authors set out to bridge this gap, bringing back the explicit interaction modeling of SMT into the neural era without the massive computational overhead.

Methods

The core innovation is the Reformer family of models, built on two main pillars:

  1. Joint Representation: Instead of separate sequences, the model input is a tensor where each cell $(i, j)$ represents the combination of the $i$-th source token and $j$-th target token. Their embeddings and positions are combined via simple addition.
  2. Separable Attention: To handle the $S \times T$ space efficiently, the authors propose performing self-attention on the two temporal dimensions separately and sequentially. This reduces the complexity from $O(S^2 T^2)$ to $O(S^2 T + S T^2)$.
Figure 1: Separable Attention over representations (Chinese pinyin-English: “wø3 hˇen hˇao .” →“I am fine .”).

The authors introduce two variants:

  • Reformer-base: A stack of layers where each layer contains a target-side attention, a point-wise feed-forward network (FFN), a source-side attention, and another FFN.
  • Reformer-fast: Addresses the "duplicate computation" problem in the base model by adding a PreNet to process source embeddings once. This version is 50% faster while maintaining comparable performance.
Figure 1: Separable Attention over representations (Chinese pinyin-English: “wø3 hˇen hˇao .” →“I am fine .”).

Additionally, they propose a Single-Shot Gradient-Based Scaling method. Instead of an expensive grid search for hyperparameters, they use a first-order approximation to find the optimal model depth and width for a given parameter budget.

Datasets

The models were evaluated on several standard translation benchmarks:

  • IWSLT15 Vietnamese-English (Vi-En): Small-scale (130K pairs).
  • IWSLT14 German-English (De-En) and English-German (En-De): Small-scale (160K pairs).
  • NIST12 Chinese-English (Zh-En): Large-scale (1.8M pairs).

Key Insights and Ideas

  • Path Length Efficiency: In Reformer-base, the path length to access any source or target token is $O(1)$, whereas a standard Transformer requires $O(L)$ (where $L$ is the number of layers) because source information must pass through the entire encoder before reaching the decoder.
  • Better Long-Range Modeling: Analysis shows that Reformer models outperform Transformers most significantly on long sentences, suggesting they capture long-term dependencies more effectively through the joint space.
  • Rare Word Proficiency: Reformer predicts low-frequency tokens more accurately than the baseline, indicating it exploits context better to infer rare words.
  • Dynamic Interaction: Unlike the static distributions often found in Transformer attention, Reformer's attention distributions vary dynamically based on the specific target/source token being processed, allowing for richer information flow.

Key Results

  • Performance Gains: The Reformer models achieved improvements of 0.7 to 1.3 BLEU points on small-scale tasks and 1.9 BLEU points on the large-scale NIST12 Zh-En task over the Transformer baseline.
  • Parameter Efficiency: After applying their scaling strategy, the Reformer-fast model beat the state-of-the-art Transformer on De-En and Zh-En while using ~50% fewer parameters.
  • Speed: Reformer-fast successfully traded off some theoretical path-length benefits for a 50% decoding speedup over the base Reformer model.

Limitations and Future Work

  • Decoding Redundancy: The Reformer-base model recomputes source information at every decoding step, which is inefficient. While Reformer-fast mitigates this with a PreNet, it re-introduces a sequential dependency ($O(L)$ path length for source tokens).
  • Early Stage: The authors acknowledge that these models are still in a "primitive form" compared to the highly optimized Transformer ecosystem.
  • Scaling Constraints: The proposed scaling method is currently limited to depth and width, as other hyperparameters (like attention heads) do not fit neatly into the gradient-based optimization formula.

Future work may involve further optimizing the joint representation paradigm to find even better balances between the $O(1)$ theoretical effectiveness of the base model and the practical efficiency of the fast variant.

Summary updated

BibTeX
@inproceedings{li2020neural,
  author = {Yanyang Li and Qiang Wang and Tong Xiao and Tongran Liu and Jingbo Zhu},
  title = {{Neural Machine Translation with Joint Representation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  url = {https://openreview.net/forum?id=PRnUt2ncerY},
}
Figure