paper-with-me

Papers

LAIT: Efficient Multi-Segment Encoding in Transformers with Layer-Adjustable Interaction

2023-05-31 · Jeremiah Milbauer, Annie Louis, Mohammad Javad Hosseini, Alex Fabrikant, Donald Metzler, Tal Schuster

Transformer encoders contextualize token representations by attending to all other tokens at each layer, leading to quadratic increase in compute effort with the input length. In practice, however, the input text of many NLP tasks can be seen as a sequence of related segments (e.g., the sequence of sentences within a passage, or the hypothesis and premise in NLI). While attending across these segments is highly beneficial for many tasks, we hypothesize that this interaction can be delayed until later encoding stages. To this end, we introduce Layer-Adjustable Interactions in Transformers (LAIT). Within LAIT, segmented inputs are first encoded independently, and then jointly. This partial two-tower architecture bridges the gap between a Dual Encoder's ability to pre-compute representations for segments and a fully self-attentive Transformer's capacity to model cross-segment attention. The LAIT framework effectively leverages existing pretrained Transformers and converts them into the hybrid of the two aforementioned architectures, allowing for easy and intuitive control over the performance-efficiency tradeoff. Experimenting on a wide range of NLP tasks, we find LAIT able to reduce 30-50% of the attention FLOPs on many tasks, while preserving high accuracy; in some practical settings, LAIT could reduce actual latency by orders of magnitude.

📄 PDF Abstract BibTeX arXiv:2305.19585

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Line Segment Detection Using Transformers without Edges

2021-01-06 · CVPR 2021 1 · Yifan Xu, Weijian Xu, David Cheung, Zhuowen Tu

In this paper, we present a joint end-to-end line segment detection algorithm using Transformers that is post-processing and heuristics-guided intermediate processing (edge/junction/region detection) free. Our method, na…

DecoderLine Segment DetectionMulti-Task Learning

A Simple and Effective Positional Encoding for Transformers

2021-04-18 · EMNLP 2021 11 · Pu-Chin Chen, Henry Tsai, Srinadh Bhojanapalli, Hyung Won Chung 외

Transformer models are permutation equivariant. To supply the order and type information of the input tokens, position and segment embeddings are usually added to the input. Recent works proposed variations of positional…

Position

SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers

2021-05-31 · NeurIPS 2021 12 · Enze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar 외

We present SegFormer, a simple, efficient yet powerful semantic segmentation framework which unifies Transformers with lightweight multilayer perception (MLP) decoders. SegFormer has two appealing features: 1) SegFormer …

2D Semantic SegmentationC++ codeCrack SegmentationDecoder+2

AFTer-UNet: Axial Fusion Transformer UNet for Medical Image Segmentation

2021-10-20 · Xiangyi Yan, Hao Tang, Shanlin Sun, Haoyu Ma 외

Recent advances in transformer-based models have drawn attention to exploring these techniques in medical image segmentation, especially in conjunction with the U-Net model (or its variants), which has shown great succes…

DecoderGPUImage SegmentationMedical Image Segmentation+3

Verb Conjugation in Transformers Is Determined by Linear Encodings of Subject Number

2023-10-23 · Sophie Hao, Tal Linzen

Deep architectures such as Transformers are sometimes criticized for having uninterpretable "black-box" representations. We use causal intervention analysis to show that, in fact, some linguistic features are represented…

Position