paper-with-me

Papers

Do Attention Heads in BERT Track Syntactic Dependencies?

2019-11-27 · Phu Mon Htut, Jason Phang, Shikha Bordia, Samuel R. Bowman

We investigate the extent to which individual attention heads in pretrained transformer language models, such as BERT and RoBERTa, implicitly capture syntactic dependency relations. We employ two methods---taking the maximum attention weight and computing the maximum spanning tree---to extract implicit dependency relations from the attention weights of each layer/head, and compare them to the ground-truth Universal Dependency (UD) trees. We show that, for some UD relation types, there exist heads that can recover the dependency type significantly better than baselines on parsed English text, suggesting that some self-attention heads act as a proxy for syntactic structure. We also analyze BERT fine-tuned on two datasets---the syntax-oriented CoLA and the semantics-oriented MNLI---to investigate whether fine-tuning affects the patterns of their self-attention, but we do not observe substantial differences in the overall dependency relations extracted using our methods. Our results suggest that these models have some specialist attention heads that track individual dependency types, but no generalist head that performs holistic parsing significantly better than a trivial baseline, and that analyzing attention weights directly may not reveal much of the syntactic knowledge that BERT-style models are known to learn.

📄 PDF Abstract BibTeX arXiv:1911.12246

Code (1)

evtaktasheva/dependency_extraction pytorch

Tasks

CoLA

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
RoBERTa 설명 없음
Residual Connection 설명 없음
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
Linear Warmup With Linear Decay Linear Warmup With Linear Decay is a learning rate schedule in which we increase the learning rate linearly for $n$ updates and then linearly decay afterwards.
Weight Decay 설명 없음

Similar Papers 제목 키워드 기반

GATology for Linguistics: What Syntactic Dependencies It Knows

2023-05-22 · Yuqian Dai, Serge Sharoff, Marc de Kamps

Graph Attention Network (GAT) is a graph neural network which is one of the strategies for modeling and representing explicit syntactic knowledge and can work with pre-trained models, such as BERT, in downstream tasks. C…

Graph AttentionGraph Neural NetworkMachine TranslationRelation Prediction

Universal Dependencies according to BERT: both more specific and more general

2020-04-30 · Findings of the Association for Computational Linguistics 2020 · Tomasz Limisiewicz, Rudolf Rosa, David Mareček

This work focuses on analyzing the form and extent of syntactic abstraction captured by BERT by extracting labeled dependency trees from self-attentions. Previous work showed that individual BERT heads tend to encode par…

Relation

What Does BERT with Vision Look At?

2020-07-01 · ACL 2020 6 · Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh 외

Pre-trained visually grounded language models such as ViLBERT, LXMERT, and UNITER have achieved significant performance improvement on vision-and-language tasks but what they learn during pre-training remains unclear. In…

Language ModelingLanguage Modelling

ConvBERT: Improving BERT with Span-based Dynamic Convolution

2020-08-06 · NeurIPS 2020 12 · Zi-Hang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen 외

Pre-trained language models like BERT and its variants have recently achieved impressive performance in various natural language understanding tasks. However, BERT heavily relies on the global self-attention block and th…

Natural Language Understanding

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

2021-01-22 · Madhura Pande, Aakriti Budhraja, Preksha Nema, Pratyush Kumar 외

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 at…

Sentence