[Paper Review] Multi-head or Single-head? An Empirical Comparison for Transformer Training
This paper challenges the conventional belief that multi-head attention's superiority stems from attending multiple positions, demonstrating instead that training stability is the key advantage. By replacing shallow multi-head Transformers with deeper single-head variants—using adaptive initialization to stabilize training—it achieves consistent performance gains across tasks without hyperparameter tuning, proving that depth, not multi-head structure, drives performance gains when training is stable.
Multi-head attention plays a crucial role in the recent success of Transformer models, which leads to consistent performance improvements over conventional attention in various applications. The popular belief is that this effectiveness stems from the ability of jointly attending multiple positions. In this paper, we first demonstrate that jointly attending multiple positions is not a unique feature of multi-head attention, as multi-layer single-head attention also attends multiple positions and is more effective. Then, we suggest the main advantage of the multi-head attention is the training stability, since it has less number of layers than the single-head attention, when attending the same number of positions. For example, 24-layer 16-head Transformer (BERT-large) and 384-layer single-head Transformer has the same total attention head number and roughly the same model size, while the multi-head one is significantly shallower. Meanwhile, we show that, with recent advances in deep learning, we can successfully stabilize the training of the 384-layer Transformer. As the training difficulty is no longer a bottleneck, substantially deeper single-head Transformer achieves consistent performance improvements without tuning hyper-parameters.
Motivation & Objective
- To investigate whether multi-head attention's success stems from attending multiple positions or from training stability.
- To compare the performance of shallow multi-head Transformers with deeper single-head variants under identical model size and computation complexity.
- To evaluate whether recent training stabilization techniques enable deeper single-head Transformers to outperform standard multi-head architectures.
- To determine if the performance gains from deeper models are due to architectural depth or the multi-head mechanism itself.
- To assess inference efficiency and training convergence speed between deep single-head and shallow multi-head Transformers.
Proposed method
- Reconstructing standard multi-head Transformers (e.g., BERT-base, BERT-large) into deeper single-head variants with the same total number of attention heads and model size.
- Using adaptive model initialization (Admin) to stabilize training of extremely deep single-head Transformers (e.g., 384-layer models).
- Training both shallow multi-head and deep single-head models under identical hyperparameters to isolate the effect of depth and architecture.
- Measuring performance across machine translation and BERT pre-training tasks to compare generalization and robustness.
- Evaluating inference speed and training efficiency (GPU hours) on identical hardware to compare practical deployment characteristics.
- Visualizing convergence curves and performance gains across varying head counts to analyze the impact of architectural depth.
Experimental results
Research questions
- RQ1Does attending multiple positions uniquely benefit multi-head attention, or can deep single-head attention achieve the same effect?
- RQ2Is the primary advantage of multi-head attention due to its ability to attend multiple positions or due to better training stability?
- RQ3Can extremely deep single-head Transformers be successfully trained with modern initialization techniques, and do they outperform shallower multi-head counterparts?
- RQ4How do performance, inference speed, and training efficiency compare between deep single-head and shallow multi-head Transformers with equivalent model size?
- RQ5Does the performance gain from depth depend on the number of attention heads, and is the improvement consistent across tasks?
Key findings
- Deep single-head Transformers with 384 layers outperform their shallower 24-layer multi-head counterparts (e.g., BERT-large) across multiple NLP tasks without any hyperparameter tuning.
- The performance improvement is not due to the multi-head mechanism per se, but rather due to increased model depth when training stability is achieved.
- Adaptive initialization (Admin) enables stable training of 384-layer single-head Transformers, which otherwise diverge with standard initialization.
- Despite having the same model size and computation complexity, the deep single-head Transformer converges faster and achieves better performance than the shallow multi-head version.
- Inference speed is nearly identical between deep single-head and shallow multi-head Transformers, with slight advantages depending on batch size and sequence length.
- The performance gain increases with the number of heads, confirming that the architectural difference between shallow multi-head and deep single-head models is a key driver of improvement.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.