Abstract
In contrast with previous approaches where information flows only towards deeper layers of a stack, we consider a multi-pass transformer (MPT) architecture in which earlier layers are allowed to process information in light of the output of later layers. To maintain a directed acyclic graph structure, the encoder stack of a transformer is repeated along a new multi-pass dimension, keeping the parameters tied, and information is allowed to proceed unidirectionally both towards deeper layers within an encoder stack and towards any layer of subsequent stacks. We consider both soft (i.e., continuous) and hard (i.e., discrete) connections between parallel encoder stacks, relying on a neural architecture search to find the best connection pattern in the hard case. We perform an extensive ablation study of the proposed MPT architecture and compare it with other state-of-the-art transformer architectures. Surprisingly, Base Transformer equipped with MPT can surpass the performance of Large Transformer on the challenging machine translation En-De and En-Fr datasets. In the hard connection case, the optimal connection pattern found for En-De also leads to improved performance for En-Fr.
Introduction
Standard Transformer architectures are essentially "one-way streets." Information flows sequentially from the input layer through a stack of $N$ layers to the output. This rigid structure imposes two primary limitations: earlier layers never access the high-level features developed by later layers, and the final output relies on information that must survive a long sequential journey through the entire stack.
Researchers from Mitsubishi Electric Research Laboratories (MERL) propose the Multi-Pass Transformer (MPT) to address these constraints. By allowing the encoder to "re-process" information in multiple passes, the model can refine its understanding of the input sequence using both low-level and high-level features simultaneously.
The Multi-Pass Architecture
The core innovation of MPT is the introduction of a multi-pass dimension. Instead of a single sequential stack, the encoder is organized into an Inner Stack (Pass 1) and an Outer Stack (Pass 2). To maintain parameter efficiency, the weights are shared between these passes; the model uses the same physical layers twice.
Information flows unidirectionally both within a stack and between stacks. The authors explored two primary methods for connecting these passes:
- Soft Connections: Every layer in the first pass contributes to every layer in the second pass. The "importance" of each connection is learned during training via a softmax-weighted sum.
- Hard Connections: A specific one-to-one mapping is established between layers of the two passes. The optimal mapping is determined using Random Neural Architecture Search (NAS).
Experimental Results
The MPT architecture was evaluated on the WMT 2014 English-German (En-De) and English-French (En-Fr) benchmarks. The results demonstrate remarkable parameter efficiency:
- Performance vs. Scale: MPT Base, with approximately 61M parameters, achieved a 28.4 BLEU score on En-De, matching the performance of the Transformer Large model, which contains 213M parameters. This represents a 70% reduction in parameters for equivalent performance.
- Comparison with NAS Models: MPT outperformed the "Evolved Transformer"—a model designed via massive evolutionary search—while utilizing a significantly simpler search space and fewer parameters.
- Generalization: The optimal hard-connection pattern discovered for the En-De task translated effectively to the En-Fr task, suggesting that MPT captures fundamental language processing strategies.
Analysis and Insights
Analysis of the learned connection patterns revealed that the model benefits from "long information paths." In many high-performing configurations, deep layers from the first pass connect back to shallower layers in the second pass, allowing for extensive refinement of features.
Interestingly, the "Soft Connection" method performed as well as the best "Hard Connection" found through NAS. As shown in the heatmaps above, the model naturally learns to prioritize specific cross-pass interactions. However, the researchers noted that connecting the final layer of the first pass directly to the first layer of the second pass could hurt performance, likely due to gradient instability in excessively long paths.
Conclusion
The Multi-Pass Transformer demonstrates that architectural flexibility can be more valuable than raw parameter count. By allowing the encoder a "second look" at the data, MPT achieves state-of-the-art results with a fraction of the memory footprint of larger models. While the multi-pass approach increases computational operations (FLOPs) during training and inference, the gains in parameter efficiency and translation quality make it a compelling alternative for resource-constrained environments. Future work may extend this multi-pass logic to the decoder or explore higher numbers of passes for more complex tasks.
Summary updated