Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

The heads hypothesis: A unifying statistical approach towards understanding multi-headed attention in BERT (2101.09115v1)

Published 22 Jan 2021 in cs.CL and cs.AI

Abstract: Multi-headed attention heads are a mainstay in transformer-based models. Different methods have been proposed to classify the role of each attention head based on the relations between tokens which have high pair-wise attention. These roles include syntactic (tokens with some syntactic relation), local (nearby tokens), block (tokens in the same sentence) and delimiter (the special [CLS], [SEP] tokens). There are two main challenges with existing methods for classification: (a) there are no standard scores across studies or across functional roles, and (b) these scores are often average quantities measured across sentences without capturing statistical significance. In this work, we formalize a simple yet effective score that generalizes to all the roles of attention heads and employs hypothesis testing on this score for robust inference. This provides us the right lens to systematically analyze attention heads and confidently comment on many commonly posed questions on analyzing the BERT model. In particular, we comment on the co-location of multiple functional roles in the same attention head, the distribution of attention heads across layers, and effect of fine-tuning for specific NLP tasks on these functional roles.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (5)
  1. Madhura Pande (3 papers)
  2. Aakriti Budhraja (3 papers)
  3. Preksha Nema (14 papers)
  4. Pratyush Kumar (44 papers)
  5. Mitesh M. Khapra (79 papers)
Citations (17)
X Twitter Logo Streamline Icon: https://streamlinehq.com

Tweets