paper-with-me

홈 › Papers

Fine- and Coarse-Granularity Hybrid Self-Attention for Efficient BERT

2022-03-17 · ACL 2022 5 · Jing Zhao, Yifan Wang, Junwei Bao, Youzheng Wu, Xiaodong He

Transformer-based pre-trained models, such as BERT, have shown extraordinary success in achieving state-of-the-art results in many natural language processing applications. However, deploying these models can be prohibitively costly, as the standard self-attention mechanism of the Transformer suffers from quadratic computational cost in the input sequence length. To confront this, we propose FCA, a fine- and coarse-granularity hybrid self-attention that reduces the computation cost through progressively shortening the computational sequence length in self-attention. Specifically, FCA conducts an attention-based scoring strategy to determine the informativeness of tokens at each layer. Then, the informative tokens serve as the fine-granularity computing units in self-attention and the uninformative tokens are replaced with one or several clusters as the coarse-granularity computing units in self-attention. Experiments on GLUE and RACE datasets show that BERT with FCA achieves 2x reduction in FLOPs over original BERT with <1% loss in accuracy. We show that FCA offers a significantly better trade-off between accuracy and FLOPs compared to prior methods.

📄 PDF Abstract BibTeX arXiv:2203.09055

Code (1)

pierre-zhao/fca-bert 공식 구현 tf

Tasks

Informativeness

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Residual Connection 설명 없음
Position-Wise Feed-Forward Layer 설명 없음
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.

Similar Papers 제목 키워드 기반

SG-Former: Self-guided Transformer with Evolving Token Reallocation

2023-08-23 · ICCV 2023 1 · Sucheng Ren, Xingyi Yang, Songhua Liu, Xinchao Wang

Vision Transformer has demonstrated impressive success across various vision tasks. However, its heavy computation cost, which grows quadratically with respect to the token sequence length, largely limits its power in ha…

Dynamic Granularity Matters: Rethinking Vision Transformers Beyond Fixed Patch Splitting

2025-11-24 · Qiyang Yu, Yu Fang, Tianrui Li, Xuemei Cao 외 arxiv

Vision Transformers (ViTs) have demonstrated strong capabilities in capturing global dependencies but often struggle to efficiently represent fine-grained local details. Existing multi-scale approaches alleviate this iss…

Computational Efficiency

MuGER$^2$: Multi-Granularity Evidence Retrieval and Reasoning for Hybrid Question Answering

2022-10-19 · Yingyao Wang, Junwei Bao, Chaoqun Duan, Youzheng Wu 외

Hybrid question answering (HQA) aims to answer questions over heterogeneous data, including tables and passages linked to table cells. The heterogeneous data can provide different granularity evidence to HQA models, e.t.…

NavigateQuestion AnsweringRetrieval

Axially Expanded Windows for Local-Global Interaction in Vision Transformers

2022-09-19 · Zhemin Zhang, Xun Gong

Recently, Transformers have shown promising performance in various vision tasks. A challenging issue in Transformer design is that global self-attention is very expensive to compute, especially for the high-resolution vi…

Pyramid Self-attention Polymerization Learning for Semi-supervised Skeleton-based Action Recognition

2023-02-05 · Binqian Xu, Xiangbo Shu

Most semi-supervised skeleton-based action recognition approaches aim to learn the skeleton action representations only at the joint level, but neglect the crucial motion characteristics at the coarser-grained body (e.g.…

Action RecognitionContrastive LearningSkeleton Based Action Recognition