BERT's Masking: The 15% Secret and Its Randomness
BERT's MLM masks 15% of input tokens, but only 80% of those are replaced with [MASK]. The remaining 20% are split: 10% replaced by a random word and 10% kept unchanged, preventing pre-training fine-tuning mismatch.
The top 3
- BERT's 80/10/10 Masking Rule Explained: Of the 15% of tokens chosen for masking in BERT, 80% are replaced with a `[MASK]` token, 10% with a random word, and 10% remain unchanged. This specific distribution helps prevent 'dataset shift' during fine-tuning and forces the model to learn robust contextual representations by predicting both masked and uncorrupted tokens.
- Top 3 Masking Alternatives Beyond BERT: While BERT's Masked Language Model (MLM) was groundbreaking, subsequent models introduced distinct pre-training objectives: RoBERTa optimized MLM with dynamic masking and extended training; ELECTRA used a more efficient token replacement detection task; and XLNet employed a permutation-based approach to capture bidirectional dependencies without direct masking.
- Why Bidirectional Masking Revolutionized NLP: BERT's Masked Language Model was revolutionary because it allowed the model to process context bidirectionally, understanding relationships between words from both left and right. This overcame the limitations of previous unidirectional models, enabling deeper semantic comprehension and significantly improving performance across diverse Natural Language Processing tasks.
Sources
Open the full topic