BERT stands for Bidirectional Encoder Representations from Transformers. It's a language model that Google researchers published in October 2018 and released as open source on November 2, 2018. Its trick is to read every word in light of the words before it and after it at the same time, which lets it tell apart meanings that depend on small words like "to", "for" or "no".
BERT understands text; it doesn't write it. That makes it a different kind of model from chatbots that generate answers.
How BERT reads text
Earlier language models mostly read a sentence in one direction, left to right, guessing each next word from the ones before it. BERT looks at both sides of each word. In "she sat on the bank of the river", the word "river" after "bank" tells it which bank is meant.
It learned this from plain text, with no human labels, through two training games BERT paper:
- Masked words. The training hid 15% of the word pieces in each passage, and BERT had to guess them from the words around them.
- Next sentence. BERT saw two sentences and had to guess whether the second really followed the first. Half the time it did; half the time it was a random sentence.
The training text was about 3.3 billion words: English Wikipedia (2,500 million words) and a collection of books (800 million). Words are split into pieces from a vocabulary of 30,000, so an unfamiliar word becomes a few familiar pieces.
The paper describes two sizes: BERT-base with 110 million parameters and BERT-large with 340 million. Both were built to be adapted. Developers add one small output layer and train briefly on their own labeled examples, such as reviews marked positive or negative. The paper's own fine-tuning runs took at most an hour on a single Cloud TPU. At release, BERT set a new best score on GLUE, a standard set of language-understanding tests.
What BERT changed in Google Search
On October 25, 2019, Google announced that it was using BERT in Search and that it helped with one in 10 searches in English in the US Google. By October 15, 2020, Google said BERT was used in almost every English query.
Google's examples showed the kind of query that improved. For "2019 brazil traveler to usa need a visa", earlier systems missed the word "to" and returned results about US citizens traveling to Brazil. With BERT, Search understood that a Brazilian was traveling to the US. In "parking on a hill with no curb", the "no" stopped being ignored.
BERT also improved featured snippets, in the two dozen countries where they were offered at the time. Today it is one of the systems in Google's guide to its ranking systems, described as helping Google understand "how combinations of words express different meanings and intent".
What it means for your content
There is no BERT setting to optimize, and no list of BERT ranking factors. BERT works on the searcher's side: it helps Google understand what a query means, and so which pages answer it. What helps is what helped before, done more carefully:
- Write for the question people actually ask. Longer, conversational queries are where BERT made the biggest difference. Pages that answer one specific search intent clearly match those queries better than pages stuffed with keyword variants.
- Keep the small words. Prepositions and negations carry meaning, so write natural sentences rather than strings of keywords. "Visa for Brazilians visiting the US" and "visa for Americans visiting Brazil" are different pages for different people.
- Answer early and plainly. A short, direct answer near the top of a section is easy to match to a question and to show as a snippet.
Google's own advice to searchers points the same way: in its 2019 announcement it said people could drop "keyword-ese" and search in a way that feels natural.
BERT and newer models
BERT started a wave of natural language processing models that are pre-trained once on large text collections, then adapted to many tasks. Many smaller and improved variants followed, and encoder models like BERT are still widely used for classification, search ranking and semantic search, where a fast model that understands text is enough.
Large language models such as those behind chatbots use the same transformer building blocks but are trained to generate text, one word after another. BERT's job is narrower: read a piece of text and represent what it means.