Abstract
The computational cost of training massive language models like BERT remains a significant barrier to research and deployment. This paper introduces Multi-Stage Layerwise Training (MSLT), also known as Progressively Stacking 2.0. MSLT accelerates the pre-training process by growing the model depth in stages and freezing lower layers once they have learned fundamental features. This approach reduces the overhead of gradient synchronization in distributed training, leading to a training speedup of over 110% while maintaining performance parity with standard training methods on GLUE and SQuAD benchmarks.
Introduction
The "BERT revolution" has significantly advanced Natural Language Processing (NLP), but at a high computational price. Training a standard BERT-Base model requires thousands of dollars and several days of high-end GPU time. A primary bottleneck in distributed training is the backward pass. Calculating gradients for every parameter and synchronizing them across multiple GPUs is significantly slower than the forward pass.
Previous methods like "Progressively Stacking" (v1.0) attempted to mitigate this by growing models from shallow to deep, but they continued to update all layers throughout training. MSLT improves upon this by recognizing that lower layers stabilize early in the training process, making further gradient updates for these layers computationally wasteful.
Methodology: Multi-Stage Layerwise Training (MSLT)
The authors propose a $k$-stage training process where the model depth increases incrementally. The core innovation is the freezing of previously trained layers.
The process follows four main steps:
- Initial Training: Start with a shallow model (e.g., 3 layers for a 12-layer target).
- Stack and Freeze: Add a new block of layers. The bottom layers are frozen; they participate in the forward pass but are ignored during the backward pass, eliminating gradient calculation and synchronization for those parameters.
- Iteration: Repeat the stacking and freezing process until the full model depth is reached.
- Global Retraining: In the final stage (roughly 20% of total steps), all layers are unfrozen and trained together to ensure global optimization across the entire stack.
This method effectively slashes communication overhead. In the authors' experiments, the backward pass was nearly six times slower than the forward pass; freezing the majority of layers during intermediate stages directly addresses this bottleneck.
Key Insights
Visualizations of attention distributions revealed that lower layers mature early, capturing local syntax and token relationships. MSLT treats training as a form of "alternating optimization," solving for a subset of variables (the top layers) while keeping others fixed. This allows the model to reach a near-optimal state much faster than traditional end-to-end training.
Results
MSLT achieves substantial speedups across different model sizes. For BERT-Base, training time was reduced from 85 hours to 40 hours. For BERT-Large, the time dropped from 188 hours to 84 hours.
As shown in the table above, MSLT (ours) achieves comparable, and sometimes superior, scores on GLUE and SQuAD benchmarks despite the significantly reduced training time. This represents a major improvement over the original Progressively Stacking method, which only offered approximately a 25% speedup.
Discussion and Limitations
While highly effective, MSLT involves trade-offs. Applying it to ALBERT requires breaking its parameter-sharing rule by using group-based sharing, which increases the total parameter count. Additionally, the authors found that for tasks requiring long-sequence understanding (like SQuAD), a specific retraining portion with longer sequences is necessary to properly learn positional embeddings. Future work may explore the optimal number of stages for even larger models, such as those at the GPT-3 scale.
Conclusion
Progressively Stacking 2.0 via MSLT provides a highly efficient path for training large language models. By strategically freezing matured layers, it overcomes the communication bottlenecks of distributed training, offering a 110%+ speedup without compromising model quality.
Summary updated