Introduction
Masked Language Modeling (MLM) has become the standard objective for pre-training bidirectional encoders like BERT and RoBERTa. Traditionally, these models employ a static masking strategy, randomly obscuring a fixed 15% of tokens throughout the entire training duration. However, researchers from Shanghai Jiao Tong University argue that this "one-size-fits-all" approach is suboptimal.
By treating masking as a time-invariant process, standard MLM fails to account for the model's evolving maturity and the varying semantic importance of different word types. This paper introduces two adaptive strategies—Masking Ratio Decay (MRD) and POS-Tagging Weighted (PTW) masking—to optimize both the quantity and quality of the training signal.
Methodology
The proposed framework moves away from static random masking by introducing time-variant schedules that adapt to the training state.
Masking Ratio Decay (MRD)
Inspired by simulated annealing, MRD starts with a high masking ratio (e.g., 30%) and gradually reduces it to a lower baseline (e.g., 15%) using linear or cosine decay schedules. The rationale is that a high masking ratio early in training forces the model to learn from sparse contexts, encouraging the development of robust global representations. As training progresses, a lower ratio allows the model to refine its understanding of fine-grained local dependencies.
POS-Tagging Weighted (PTW) Masking
Not all words provide equal learning value. "Function words" (e.g., the, a, in) are grammatically necessary but semantically thin and are mastered by the model very early. PTW masking utilizes part-of-speech (POS) tagging to track the cumulative loss of different word categories. Categories with higher losses—typically "content words" like nouns, verbs, and adjectives—are assigned higher masking probabilities. This ensures the model focuses its computational effort on the most challenging and informative tokens.
Key Insights and Results
The "Easy Word" Plateau
Empirical analysis revealed that the loss for function words (DET, PRON, ADP) converges almost immediately compared to content words. Continuing to mask these words at a high frequency leads to "wasted effort," where the model repeatedly predicts tokens it has already mastered. PTW masking effectively shifts the model's attention toward more complex semantic structures as training matures.
Efficiency and Performance Gains
One of the most significant findings is the efficiency gain provided by MRD. Models using a cosine decay schedule reached the same performance level at 650k steps that the baseline BERT reached at 1 million steps—a 35% reduction in training time.
On downstream benchmarks, the improvements were consistent:
- SQuAD v1.1: MRD with cosine decay outperformed the fixed 15% baseline across all training steps. PTW masking specifically improved F1 scores by 1.0 point.
- GLUE: For a BERT-base model trained for 1M steps, MRD improved the average GLUE score by 1.7 points.
- CoNLL-2003: PTW masking improved NER performance by 0.5 F1, suggesting that focusing on "difficult" words helps the model capture essential entities more effectively.
Conclusion
This research demonstrates that adaptive masking is a powerful tool for improving the efficiency and effectiveness of language model pre-training. By starting with high-difficulty global challenges (MRD) and progressively focusing on semantically rich content (PTW), models can develop more mature representations in significantly less time. While currently focused on encoder-only architectures, these time-variant strategies offer a promising path for optimizing larger-scale pre-training across various model families.
Summary updated