Write the multi-head attention formula: MultiHead(Q,K,V) = Concat(head_1,...,head_h)W^O

Ever wondered how machines understand the importance of words in a sentence?

Image: Mushki Brichta, CC BY-SA 4.0, via Wikimedia Commons

Write the multi-head attention formula: MultiHead(Q,K,V) = Concat(head_1,...,head_h)W^O

Ever wondered how machines understand the importance of words in a sentence?

Imagine you're reading a long email and trying to find the key points quickly. You don't read the whole thing word for word; instead, you focus on the most important parts.

Think of each word in the sentence as a person at a party. Some people are more important to the conversation than others. The machine decides who to 'listen' to more by assigning importance, like deciding who's talking about the party's theme.

Example

In an email, the machine might 'listen' more to the words "meeting," "deadline," and "budget" because they are key points.

Remember this

Multi-head attention helps machines focus on the most important parts of a sentence, like picking out the key points in an email.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath