Introduction to Machine Learning for SEO
- Comparative Analysis of NLP APIs versus generative AI on entity extraction
- Practical: Methods for search intent classification – Rule-based and ML-enabled Classification
ML Models & Algorithms
In shortA smaller, faster distilled version of BERT; in SEO it powers Mark Williams-Cook's classifier that predicts Google's eight query semantic classes.
DistilBERT is a compact version of BERT released by Hugging Face in 2019. It keeps most of BERT’s language understanding while being much smaller and faster, which makes it a popular base for text classifiers. In SEO it is best known as the model behind Mark Williams-Cook’s Refined Query Semantic Class Classifier, which predicts which of eight Google query classes a keyword belongs to.
DistilBERT is built with knowledge distillation: a small “student” model is trained to reproduce the behaviour of a large “teacher” model, here BERT. According to its paper, the result is 40% smaller and 60% faster while retaining 97% of BERT’s language understanding performance. Like BERT, it is then fine-tuned on labelled examples to do one job, such as sorting queries into categories (multi-class classification).
The query classifier came out of an exploit Williams-Cook’s team found in Google’s systems, which exposed how Google labelled queries. Almost all queries were assigned one of eight “refined query semantic classes”: SHORT_FACT, BOOL, INSTRUCTION, DEFINITION, REASON, COMPARISON, CONSEQUENCE and OTHER. He fine-tuned DistilBERT on 4.8 million queries from that data and published it as a free tool.
Run a keyword list about Google Trends through the classifier and you would expect “is pytrends free” to come back as BOOL, “how to use pytrends” as INSTRUCTION and “pytrends vs serpapi” as COMPARISON. Those three queries need a one-line answer, a step-by-step tutorial and a comparison table respectively, even though a traditional tool would call them all informational.