paper-with-me

홈 › Papers

Do Transformers Parse while Predicting the Masked Word?

2023-03-14 · Haoyu Zhao, Abhishek Panigrahi, Rong Ge, Sanjeev Arora

Pre-trained language models have been shown to encode linguistic structures, e.g. dependency and constituency parse trees, in their embeddings while being trained on unsupervised loss functions like masked language modeling. Some doubts have been raised whether the models actually are doing parsing or only some computation weakly correlated with it. We study questions: (a) Is it possible to explicitly describe transformers with realistic embedding dimension, number of heads, etc. that are capable of doing parsing -- or even approximate parsing? (b) Why do pre-trained models capture parsing structure? This paper takes a step toward answering these questions in the context of generative modeling with PCFGs. We show that masked language models like BERT or RoBERTa of moderate sizes can approximately execute the Inside-Outside algorithm for the English PCFG [Marcus et al, 1993]. We also show that the Inside-Outside algorithm is optimal for masked language modeling loss on the PCFG-generated data. We also give a construction of transformers with $50$ layers, $15$ attention heads, and $1275$ dimensional embeddings in average such that using its embeddings it is possible to do constituency parsing with $>70\%$ F1 score on PTB dataset. We conduct probing experiments on models pre-trained on PCFG-generated data to show that this not only allows recovery of approximate parse tree, but also recovers marginal span probabilities computed by the Inside-Outside algorithm, which suggests an implicit bias of masked language modeling towards this algorithm.

📄 PDF Abstract BibTeX arXiv:2303.08117

Code (0)

등록된 구현이 없습니다.

Tasks

Constituency ParsingLanguage ModelingLanguage ModellingMasked Language Modeling

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
Residual Connection 설명 없음
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
WordPiece 설명 없음
RoBERTa 설명 없음

Similar Papers 제목 키워드 기반

Sequence Length Independent Norm-Based Generalization Bounds for Transformers

2023-10-19 · Jacob Trauger, Ambuj Tewari

This paper provides norm-based generalization bounds for the Transformer architecture that do not depend on the input sequence length. We employ a covering number based approach to prove our bounds. We use three novel co…

Generalization Bounds

Predicting Attention Sparsity in Transformers

2021-09-24 · spnlp (ACL) 2022 5 · Marcos Treviso, António Góis, Patrick Fernandes, Erick Fonseca 외

Transformers' quadratic complexity with respect to the input sequence length has motivated a body of work on efficient sparse approximations to softmax. An alternative path, used by entmax transformers, consists of havin…

DecoderLanguage ModelingLanguage ModellingMachine Translation+3

Predicting Attention Sparsity in Transformers

2021-11-16 · ACL ARR November 2021 11 · Anonymous

Transformers' quadratic complexity with respect to the input sequence length has motivated a body of work on efficient sparse approximations to softmax. An alternative path, used by entmax transformers, consists of havin…

DecoderLanguage ModelingLanguage ModellingMachine Translation+3

SparseMAE: Sparse Training Meets Masked Autoencoders

2023-01-01 · ICCV 2023 1 · Aojun Zhou, Yang Li, Zipeng Qin, Jianbo Liu 외

Masked Autoencoders (MAE) and its variants have proven to be effective for pretraining large-scale Vision Transformers (ViTs). However, small-scale models do not benefit from the pretraining mechanisms due to limited…

LayoutLMv3: Pre-training for Document AI with Unified Text and Image Masking

2022-04-18 · Yupan Huang, Tengchao Lv, Lei Cui, Yutong Lu 외

Self-supervised pre-training techniques have achieved remarkable progress in Document AI. Most multimodal pre-trained models use a masked language modeling objective to learn bidirectional representations on the text mod…

cross-modal alignmentDocument AIdocument-image-classificationDocument Image Classification+16