[Paper Review] EarlyBERT: Efficient BERT Training via Early-bird Lottery Tickets
EarlyBERT proposes a computationally efficient training method for BERT by identifying structured 'winning tickets'—pruned subnetworks—in the early stages of pre-training. By slimming self-attention and fully-connected layers, it achieves 35–45% faster training with minimal performance drop on GLUE and SQuAD benchmarks.
Heavily overparameterized language models such as BERT, XLNet and T5 have achieved impressive success in many NLP tasks. However, their high model complexity requires enormous computation resources and extremely long training time for both pre-training and fine-tuning. Many works have studied model compression on large NLP models, but only focusing on reducing inference time while still requiring an expensive training process. Other works use extremely large batch sizes to shorten the pre-training time, at the expense of higher computational resource demands. In this paper, inspired by the Early-Bird Lottery Tickets recently studied for computer vision tasks, we propose EarlyBERT, a general computationally-efficient training algorithm applicable to both pre-training and fine-tuning of large-scale language models. By slimming the self-attention and fully-connected sub-layers inside a transformer, we are the first to identify structured winning tickets in the early stage of BERT training. We apply those tickets towards efficient BERT training, and conduct comprehensive pre-training and fine-tuning experiments on GLUE and SQuAD downstream tasks. Our results show that EarlyBERT achieves comparable performance to standard BERT, with 35~45% less training time. Code is available at https://github.com/VITA-Group/EarlyBERT.
Motivation & Objective
- Address the high computational cost and long training times of large-scale pre-trained language models like BERT.
- Overcome the limitation of existing model compression methods that shift resource burden from inference to training.
- Develop a general, efficient training algorithm applicable to both pre-training and fine-tuning stages of large NLP models.
- Enable significant training time reduction without relying on large-batch training or distributed systems.
- Demonstrate that structured lottery tickets can emerge early in BERT training and be effectively leveraged for efficiency.
Proposed method
- Apply network slimming to self-attention and fully-connected sub-layers in BERT to identify structured winning tickets.
- Use a structured magnitude-based pruning strategy with L0 regularization to identify important heads and neurons early in training.
- Train a BERT model for only 400 steps (less than 3% of standard pre-training) to identify the winning ticket configuration.
- Prune 4 self-attention heads per layer in BERT BASE and 6 in BERT LARGE, with 30% pruning of intermediate neurons in feed-forward layers.
- Train the pruned network with reduced training steps (80% of default) to further accelerate training while maintaining performance.
- Apply the same winning ticket structure to both pre-training and fine-tuning stages, enabling end-to-end efficiency gains.
Experimental results
Research questions
- RQ1Can structured lottery tickets emerge early in BERT training, enabling efficient pre-training and fine-tuning?
- RQ2To what extent can structured pruning reduce training time without significant performance degradation?
- RQ3How does early identification of winning tickets compare to iterative magnitude-based pruning (IMP) in terms of efficiency and accuracy?
- RQ4Does the efficiency gain from early lottery tickets hold across different downstream tasks with varying dataset sizes?
- RQ5Can the winning ticket structure be reused across both pre-training and fine-tuning stages to maximize training time savings?
Key findings
- EarlyBERT reduces pre-training time by 30–35% on BERT BASE and BERT LARGE while maintaining performance within 1% of the full BERT baseline on most GLUE and SQuAD tasks.
- On downstream tasks with larger datasets (e.g., QNLI, QQP, SST-2), EarlyBERT achieves performance within 1% of BERT baseline, with minimal accuracy drop.
- On smaller datasets (e.g., CoLA, MRPC), performance drops are observed, but improvements are seen on RTE, indicating task-dependent sensitivity.
- Reducing pre-training steps to 80% of the default setting yields the best balance between efficiency and performance, with minimal accuracy loss.
- Compared to unstructured lottery tickets (Chen et al., 2020b), EarlyBERT achieves comparable accuracy drop (1.37% on SQuAD) with 60% less training time and 76% of the FLOPs.
- The method is generalizable and effective for both pre-training and fine-tuning, offering consistent training time savings across stages.
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.