mean pooling does: averages all token embeddings to get a sentence embedding

How can we summarize a whole sentence's meaning with just one number?

Image: svonog, CC BY 2.0, via Wikimedia Commons

mean pooling does: averages all token embeddings to get a sentence embedding

How can we summarize a whole sentence's meaning with just one number?

Imagine you're trying to describe the mood of a conversation with just one word. Each person's words are like individual ingredients in a recipe.

To get a single summary, you could average the mood of each person's words. This way, you get a general mood for the whole conversation.

Example

If Alice said she's happy (3), Bob said he's sad (1), and Carol said she's neutral (2), the average mood is (3+1+2)/3 = 2.

Remember this

Averaging all the mood scores gives us a sentence embedding that represents the overall mood.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath