Neural Machine Translation with Joint Representation

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

Abstract

Though early successes of Statistical Machine Translation (SMT) systems are attributed in part to the explicit modelling of the interaction between any two source and target units, e.g., alignment, the recent Neural Machine Translation (NMT) systems resort to the attention which partially encodes the interaction for efficiency. In this paper, we employ Joint Representation that fully accounts for each possible interaction. We sidestep the inefficiency issue by refining representations with the proposed efficient attention operation. The resulting Reformer models offer a new Sequence-to-Sequence modelling paradigm besides the Encoder-Decoder framework and outperform the Transformer baseline in either the small scale IWSLT14 German-English, English-German and IWSLT15 Vietnamese-English or the large scale NIST12 Chinese-English translation tasks by about 1 BLEU point. We also propose a systematic model scaling approach, allowing the Reformer model to beat the state-of-the-art Transformer in IWSLT14 German-English and NIST12 Chinese-English with about 50% fewer parameters.

Introduction

Traditional Statistical Machine Translation (SMT) relied heavily on explicit alignment matrices to model the interaction between source and target words. Modern Neural Machine Translation (NMT) has largely replaced this with the attention mechanism within an asymmetric Encoder-Decoder framework. However, standard attention can be viewed as a surrogate that only partially captures these interactions. This paper introduces the Reformer, a novel NMT architecture that utilizes a unified "Joint Representation" to model the Cartesian product of all source and target units directly.

Joint Representation and Separable Attention

The core innovation of the Reformer is representing source and target sentences in a single $S \times T \times H$ joint space, where $S$ and $T$ are the lengths of the source and target sentences, and $H$ is the hidden dimension. This allows for $O(1)$ path lengths between any source and target token, facilitating better dependency modeling.

Comparison of information flow during training and decoding in the joint representation space.

To manage the computational complexity of attending to an $S \times T$ plane—which would naively be $O(S^2 T^2)$—the authors propose Separable Attention. Inspired by separable convolutions, this mechanism performs self-attention along the source dimension and the target dimension sequentially. This reduces the complexity to $O(S^2 T + ST^2)$, making the joint representation feasible for standard hardware.

Model Architecture

The authors propose two primary variants of the architecture: Reformer-base and Reformer-fast.

Detailed architecture of the Reformer-base model, including sublayer operations and the PreNet component.
  1. Reformer-base: This model consists of a stack of $L$ layers. Each layer includes target-side aggregation (separable attention), source-side aggregation, and point-wise transformations (FFNs).
  2. Reformer-fast: To optimize decoding speed, this variant introduces a PreNet. The PreNet pre-processes source embeddings through several self-attention layers, allowing the main joint representation layers to reuse these high-level abstractions. This reduces redundant computations during the auto-regressive decoding process, achieving speeds comparable to standard Transformers.

Additionally, a single-shot gradient-based scaling method is introduced to optimize model depth and width without exhaustive grid searches, significantly improving parameter efficiency.

Experimental Results

The Reformer was evaluated across multiple benchmarks, including IWSLT14 (De-En, En-De), IWSLT15 (Vi-En), and the large-scale NIST12 (Zh-En).

  • Performance: The Reformer-base consistently outperformed Transformer baselines, showing gains of +1.3 BLEU on Vi-En and +1.9 BLEU on NIST12 Zh-En.
  • Efficiency: Using the proposed scaling approach, the Reformer surpassed the state-of-the-art "Transformer-big" on the Zh-En task while utilizing 50% fewer parameters (146M vs 291M).
  • Robustness: Analysis indicates the model is particularly effective at predicting rare tokens and maintaining appropriate translation lengths, suggesting superior capture of long-range dependencies compared to traditional encoder-decoder models.

Conclusion

The Reformer presents a compelling alternative to the standard Encoder-Decoder paradigm by leveraging joint representations. By addressing the efficiency challenges of $S \times T$ modeling through separable attention and PreNet architectures, it achieves state-of-the-art performance with significantly reduced parameter counts.

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