Abstract
While the Transformer encoder has been extensively studied, the decoder remains relatively unexamined, often treated as a "black box." This research peels back the layers of the Transformer decoder to reveal that its feed-forward sub-layers are surprisingly redundant. By introducing a novel probing scheme to track information flow, the authors developed a "simplified decoder" that is 11–14% faster and significantly smaller, with virtually no loss in translation quality across major benchmarks.
Introduction
The Transformer decoder performs the heavy lifting of machine translation, simultaneously modeling target language history and aligning it with source-side context. Despite its importance, the specific roles of its internal sub-layers—self-attention, cross-attention, and feed-forward networks—are not well understood. This paper addresses three fundamental questions: how information evolves layer-by-layer, how specific sub-layers exploit source information, and whether the standard information fusion process is efficient.
Deconstructing the Decoder
To analyze the decoder's internal mechanics, the authors re-conceptualize the standard layer into three functional modules:
- Target Exploitation Module (TEM): The self-attention sub-layer that processes previous target tokens.
- Source Exploitation Module (SEM): The cross-attention sub-layer that extracts information from the encoder's output.
- Information Fusion Module (IFM): The Feed-Forward Network (FFN) and residual connections that merge source and target data.
Probing Information Flow
The researchers designed a Universal Probing Scheme to "see" inside the model. They trained small, independent probes to reconstruct original source or target sequences using only the internal vectors from specific layers. Low reconstruction perplexity indicates that the specific information is heavily embedded in that layer. Additionally, they employed traditional metrics like Alignment Error Rate (AER) and a new metric called Cumulative Coverage to track how the decoder "notices" source words as it processes a sentence.
Key Insights: Division of Labor and Redundancy
The study revealed a distinct functional evolution across the decoder layers:
- The SEM as Conductor: The Source Exploitation Module guides the entire representation's evolution. Source information peaks in the middle layers before thinning out as the model focuses on specific word alignments.
- Layer-wise Specialization: Lower layers focus on gathering a "global view" of the source (high coverage, but poor alignment), while higher layers perform the surgical task of word-to-word alignment.
- FFN Redundancy: Surprisingly, the Feed-Forward Network—which typically accounts for a massive portion of the model's parameters—does not significantly change the amount of information being fused. The simple "Add & Norm" operation performs the bulk of the fusion work.
The Simplified Decoder
Based on the finding that the FFN is largely redundant for information fusion, the authors proposed a Simplified Decoder. By removing the FFN from every decoder layer and retaining only the "Add & Norm" operation for fusion, they achieved remarkable efficiency gains:
- Speed: A consistent 11–14% boost in both training and inference speeds.
- Efficiency: A massive reduction in total parameters.
- Performance: On WMT14 En-De and En-Fr, BLEU scores dropped by a negligible 0.1–0.3 points. On WMT17 En-Zh, the simplified model actually gained 0.9 BLEU points.
- Human Evaluation: Blind tests confirmed that the simplified model's fluency and adequacy are nearly identical to the standard Transformer Base model.
Conclusion
This research demonstrates that the standard Transformer decoder is over-parameterized in its feed-forward sub-layers. By understanding the specific roles of the TEM and SEM, researchers can build more efficient models that maintain high translation quality while significantly reducing computational overhead. Future work may extend these findings to other sequence-to-sequence tasks like summarization and grammar correction.
Summary updated