paper-with-me

홈 › Papers

Long-Short Transformer: Efficient Transformers for Language and Vision

2021-07-05 · NeurIPS 2021 12 · Chen Zhu, Wei Ping, Chaowei Xiao, Mohammad Shoeybi, Tom Goldstein, Anima Anandkumar, Bryan Catanzaro

Transformers have achieved success in both language and vision domains. However, it is prohibitively expensive to scale them to long sequences such as long documents or high-resolution images, because self-attention mechanism has quadratic time and memory complexities with respect to the input sequence length. In this paper, we propose Long-Short Transformer (Transformer-LS), an efficient self-attention mechanism for modeling long sequences with linear complexity for both language and vision tasks. It aggregates a novel long-range attention with dynamic projection to model distant correlations and a short-term attention to capture fine-grained local correlations. We propose a dual normalization strategy to account for the scale mismatch between the two attention mechanisms. Transformer-LS can be applied to both autoregressive and bidirectional models without additional complexity. Our method outperforms the state-of-the-art models on multiple tasks in language and vision domains, including the Long Range Arena benchmark, autoregressive language modeling, and ImageNet classification. For instance, Transformer-LS achieves 0.97 test BPC on enwik8 using half the number of parameters than previous method, while being faster and is able to handle 3x as long sequences compared to its full-attention version on the same hardware. On ImageNet, it can obtain the state-of-the-art results (e.g., a moderate size of 55.8M model solely trained on 224x224 ImageNet-1K can obtain Top-1 accuracy 84.1%), while being more scalable on high-resolution images. The source code and models are released at https://github.com/NVIDIA/transformer-ls .

📄 PDF Abstract BibTeX arXiv:2107.02192

Code (3)

NVIDIA/transformer-ls 공식 구현 jax
keonlee9420/Comprehensive-Transformer-TTS pytorch
lucidrains/long-short-transformer pytorch

Tasks

Language ModelingLanguage Modelling

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
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 설명 없음
Adam 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…

Similar Papers 제목 키워드 기반

QT-TDM: Planning With Transformer Dynamics Model and Autoregressive Q-Learning

2024-07-26 · Mostafa Kotb, Cornelius Weber, Muhammad Burhan Hafez, Stefan Wermter

Inspired by the success of the Transformer architecture in natural language processing and computer vision, we investigate the use of Transformers in Reinforcement Learning (RL), specifically in modeling the environment'…

continuous-controlContinuous ControlModel Predictive ControlQ-Learning+1

Transformers in Vision: A Survey

2021-01-04 · Salman Khan, Muzammal Naseer, Munawar Hayat, Syed Waqas Zamir 외

Astounding results from Transformer models on natural language tasks have intrigued the vision community to study their application to computer vision problems. Among their salient benefits, Transformers enable modeling …

Action RecognitionActivity RecognitionColorizationimage-classification+14

Causal Transformers Perform Below Chance on Recursive Nested Constructions, Unlike Humans

2021-10-14 · Yair Lakretz, Théo Desbordes, Dieuwke Hupkes, Stanislas Dehaene

Recursive processing is considered a hallmark of human linguistic abilities. A recent study evaluated recursive processing in recurrent neural language models (RNN-LMs) and showed that such models perform below chance le…

Focal Self-attention for Local-Global Interactions in Vision Transformers

2021-07-01 · Jianwei Yang, Chunyuan Li, Pengchuan Zhang, Xiyang Dai 외

Recently, Vision Transformer and its variants have shown great promise on various computer vision tasks. The ability of capturing short- and long-range visual dependencies through self-attention is arguably the main sour…

image-classificationImage ClassificationInstance Segmentationobject-detection+2

W-Transformers : A Wavelet-based Transformer Framework for Univariate Time Series Forecasting

2022-09-08 · Lena Sasal, Tanujit Chakraborty, Abdenour Hadid

Deep learning utilizing transformers has recently achieved a lot of success in many vital areas such as natural language processing, computer vision, anomaly detection, and recommendation systems, among many others. Amon…

Anomaly DetectionRecommendation SystemsRepresentation LearningTime Series+3