# What is Masked Language Modeling? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Natural Language Processing  
> **Canonical Citation:** [https://spidits.com/ai-glossary/masked-language-modeling](https://spidits.com/ai-glossary/masked-language-modeling)

## Definition
Masked Language Modeling (MLM) is a self-supervised training task where a model learns token context by predicting hidden (masked) words in a sentence using surrounding left and right text tokens.

## Architectural Mechanics & Deep Dive
Masked Language Modeling (MLM) is a self-supervised pre-training task where a model is trained to predict words that have been intentionally hidden (masked) within a sentence. Used to train bidirectional models like BERT, MLM forces the model to analyze context from both left and right directions simultaneously, building deep semantic word representations.

## Industry Applications & Real-World Use Cases
Encoder model pre-training, BERT training, and token context representation.

## Frequently Asked Questions

### Which famous model uses masked language modeling?
BERT (Bidirectional Encoder Representations from Transformers) uses MLM as its primary pre-training objective.

### How does MLM differ from causal language modeling?
MLM is bidirectional (looks at past and future tokens to guess the middle word). Causal modeling is unidirectional (only looks at past tokens to predict the next word).

## Related Terminology
- [bert](https://spidits.com/ai-glossary/bert)
- [causal-language-model](https://spidits.com/ai-glossary/causal-language-model)
- [self-supervised-learning](https://spidits.com/ai-glossary/self-supervised-learning)

---
*From the SPIDITS AI Knowledge Base (336+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
