Abstract
This paper presents some preliminary investigations of a new co-attention mechanism in neural transduction models. We propose a paradigm, termed Two-Headed Monster (THM), which consists of two symmetric encoder modules and one decoder module connected with co-attention. As a specific and concrete implementation of THM, Crossed Co-Attention Networks (CCNs) are designed based on the Transformer model. We demonstrate CCNs on WMT 2014 EN-DE and WMT 2016 EN-FI translation tasks and our model outperforms the strong Transformer baseline by 0.51 (big) and 0.74 (base) BLEU points on EN-DE and by 0.17 (big) and 0.47 (base) BLEU points on EN-FI.
Introduction
Standard Transformer models typically rely on a single encoder-decoder pipeline. While highly effective, this linear approach can sometimes struggle to capture the full complexity of linguistic relationships or may become overly reliant on specific input representations. This research addresses the challenge of enhancing feature representation through "co-attention," a technique historically successful in multi-modal tasks like Visual Question Answering. The authors investigate whether the benefits of co-attention—relating information from two different channels—can be applied to single-modality tasks like machine translation by creating two distinct information streams from a single source text.
The Two-Headed Monster Paradigm
The proposed paradigm, the Two-Headed Monster (THM), utilizes two parallel, symmetric encoder branches (the "heads") that feed into a single fusion model or decoder.
To ensure these branches learn complementary rather than redundant features, the authors introduce "input corruption." Sub-word tokens are randomly swapped at a 0.5 probability, and different dropout masks are applied to each branch. This forces the two heads to process slightly different "views" of the same input sentence, creating the necessary diversity for co-attention to be effective.
Crossed Co-Attention Networks (CCNs)
The specific implementation of the THM paradigm is the Crossed Co-Attention Network (CCN), which adapts the Transformer architecture. In a standard self-attention layer, the Queries (Q), Keys (K), and Values (V) are derived from the same input. In the CCN encoder, these are "crossed":
- Left Branch: Derives Values and Keys from the left input, but takes its Queries from the right input.
- Right Branch: Derives Values and Keys from the right input, but takes its Queries from the left input.
This crossing mechanism forces the parallel neural channels to intertwine and exchange information throughout the encoding process. The decoder is similarly modified to alternate between these two encoder branches as sources for its multi-head attention layers, concatenating the results before the final feed-forward stage.
Experimental Results
The model was evaluated on two major benchmarks: WMT 2014 English-German (EN-DE) (~4.5M pairs) and WMT 2016 English-Finnish (EN-FI) (~2M pairs). The CCN outperformed the standard Transformer baseline across all configurations:
- EN-DE: Improved BLEU scores by 0.74 (Base) and 0.51 (Big).
- EN-FI: Improved BLEU scores by 0.47 (Base) and 0.17 (Big).
Beyond raw performance, the THM models demonstrated superior training stability and model selection reliability. In 75% of cases, the model that performed best on the validation set was also a top-3 performer on the test set, a significantly higher consistency rate than the baseline.
Discussion and Limitations
The primary trade-off for these gains is computational overhead. Because the encoder is doubled, the total parameter count nearly doubles, and training time per epoch increases by approximately 60% to 80%. The model's success also hinges on maintaining diversity between the two branches via dropout and input corruption to prevent them from converging into a single redundant path. Future work may explore parameter-sharing techniques to achieve similar performance gains with a more efficient footprint.
Summary updated