Compare mean pooling against CLS-token pooling for sentence embeddings
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Mean pooling wins for sentence similarity because BERT's MLM pretraining does not train CLS to summarize sentence meaning; SBERT measured the gap at 3 to 7 STS points.
Imagine you ask 32 jurors to vote on a verdict (mean pool) versus asking only one juror who happened to sit in seat 1 and never had the case explained to them (CLS pool). The first gives you the collective opinion; the second gives you one person's underprepared guess. Mean pool wins because every token in BERT was trained to predict its context, so averaging them collects sentence-wide signal. CLS in raw BERT was never specifically trained to summarize, so leaning on it alone is asking for a job the model was not assigned.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
6 to 8 min: mean vs CLS definitions + MLM-mismatch argument + SBERT empirical gap + why every modern encoder embedder uses mean + when CLS is acceptable.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Picking CLS because BERT papers use CLS for classification. Classification is not similarity; SBERT specifically showed mean beats CLS for STS by 3 to 7 points.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.