Input-length-shortening and text generation via attention values
Not on the map. Why?
Abstract (arXiv)
Identifying words that impact a task's performance more than others is a challenge in natural language processing. Transformers models have recently addressed this issue by incorporating an attention mechanism that assigns greater attention (i.e., relevance) scores to some words than others. Because of the attention mechanism's high computational cost, transformer models usually have an input-length limitation caused by hardware constraints. This limitation applies to many transformers, including the well-known bidirectional encoder representations of the transformer (BERT) model. In this paper, we examined BERT's attention assignment mechanism, focusing on two questions: (1) How can attention be employed to reduce input length? (2) How can attention be used as a control mechanism for conditional text generation? We investigated these questions in the context of a text classification task. We discovered that BERT's early layers assign more critical attention scores for text classification tasks compared to later layers. We demonstrated that the first layer's attention sums could be used to filter tokens in a given sequence, considerably decreasing the input length while maintaining good test accuracy. We also applied filtering, which uses a compute-efficient semantic similarities algorithm, and discovered that retaining approximately 6% of the original sequence is sufficient to obtain 86.5% accuracy. Finally, we showed that we could generate data in a stable manner and indistinguishable from the original one by only using a small percentage (10%) of the tokens with high attention scores according to BERT's first layer.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 30 of its 39 references that are in the map. First posted on arXiv 14 Mar 2023.
Builds on
30 of 39 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2019BioBERT: a pre-trained biomedical language representation model for biomedical text miningcited by 1,935
18 more
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2019SciBERT: A Pretrained Language Model for Scientific Textcited by 1,404
- 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,362
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
- 2019Attention is not Explanationcited by 916
- 2020A Primer in BERTology: What we know about how BERT workscited by 807
- 2019Are Sixteen Heads Really Better than One?cited by 803
- 2019Attention is not not Explanationcited by 629
- 2021TransGAN: Two Pure Transformers Can Make One Strong GAN, and That Can Scale Upcited by 162
- 2019Blockwise Self-Attention for Long Document Understandingcited by 158
- 2019Open Sesame: Getting Inside BERT's Linguistic Knowledgecited by 119
- 2019On the Use of ArXiv as a Datasetcited by 101
- 2022Token Dropping for Efficient BERT Pretrainingcited by 42
- 2019Towards Controllable and Personalized Review Generationcited by 24
- 2021SentiPrompt: Sentiment Knowledge Enhanced Prompt-Tuning for Aspect-Based Sentiment Analysiscited by 23
- 2022Transkimmer: Transformer Learns to Layer-wise Skimcited by 21
- 2021Block-Skim: Efficient Question Answering for Transformercited by 16
- 2021Exploring Conditional Text Generation for Aspect-Based Sentiment Analysiscited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.