# BERT (2018)

> Pretrain a Transformer to fill in masked words, then fine-tune it for almost any language task.

Page: https://mralbu.github.io/ai-datasets/p/bert

## Key facts

- Title: BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
- Authors: Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova
- Venue: NAACL 2019
- Category: Text
- Paper: https://www.alphaxiv.org/abs/1810.04805

## Why it matters

BERT made "pretrain once, fine-tune everywhere" the standard way to do NLP, and it topped almost every leaderboard at once. That pushed benchmark makers to build harder tests such as SuperGLUE, and BERT-style encoders still power much of search, classification and retrieval.

## The idea

Hide 15% of the words in a sentence and train a Transformer encoder to recover them from the context on both sides, plus guess whether two sentences follow each other. Pretrain on books and Wikipedia (3.3 billion words), then add one small layer and fine-tune for each task.

## The result

GLUE score of 80.5, a 7.7-point absolute improvement, and 93.2 F1 on SQuAD v1.1, above the human baseline.

## The data

- [GLUE (2018)](https://mralbu.github.io/ai-datasets/d/glue.md): Nine English language-understanding tasks rolled into one score.
- [SQuAD (2016)](https://mralbu.github.io/ai-datasets/d/squad.md): 100k+ questions about Wikipedia paragraphs; the answer is a span of the text.

## Builds on

- [Transformer (2017)](https://mralbu.github.io/ai-datasets/p/transformer.md)

## Led to

- [T5 (2019)](https://mralbu.github.io/ai-datasets/p/t5.md)
- [DPR (2020)](https://mralbu.github.io/ai-datasets/p/dpr.md)
- [RAG (2020)](https://mralbu.github.io/ai-datasets/p/rag.md)
- [wav2vec 2.0 (2020)](https://mralbu.github.io/ai-datasets/p/wav2vec2.md)
- [HuBERT (2021)](https://mralbu.github.io/ai-datasets/p/hubert.md)
- [MAE (2021)](https://mralbu.github.io/ai-datasets/p/mae.md)

## Part of

- [Pretrain, then fine-tune](https://mralbu.github.io/ai-datasets/t/pretrain-then-finetune.md) (step 4 of 5)
- [Reading and retrieval](https://mralbu.github.io/ai-datasets/t/reading-retrieval.md) (step 2 of 4)
