paper-with-me

Papers

Relative Positional Encoding for Transformers with Linear Complexity

2021-05-18 · Antoine Liutkus, Ondřej Cífka, Shih-Lun Wu, Umut Şimşekli, Yi-Hsuan Yang, Gaël Richard

Recent advances in Transformer models allow for unprecedented sequence lengths, due to linear space and time complexity. In the meantime, relative positional encoding (RPE) was proposed as beneficial for classical Transformers and consists in exploiting lags instead of absolute positions for inference. Still, RPE is not available for the recent linear-variants of the Transformer, because it requires the explicit computation of the attention matrix, which is precisely what is avoided by such methods. In this paper, we bridge this gap and present Stochastic Positional Encoding as a way to generate PE that can be used as a replacement to the classical additive (sinusoidal) PE and provably behaves like RPE. The main theoretical contribution is to make a connection between positional encoding and cross-covariance structures of correlated Gaussian processes. We illustrate the performance of our approach on the Long-Range Arena benchmark and on music generation.

📄 PDF Abstract BibTeX arXiv:2105.08399

Code (1)

aliutkus/spe 공식 구현 jax

Tasks

Gaussian ProcessesImage ClassificationMusic GenerationText Classification

Methods 이 논문이 사용한 방법론

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 설명 없음
Attention 설명 없음
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…
Multi-Head Attention 설명 없음
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…

Similar Papers 제목 키워드 기반

Linearized Relative Positional Encoding

2023-07-18 · Zhen Qin, Weixuan Sun, Kaiyue Lu, Hui Deng 외

Relative positional encoding is widely used in vanilla and linear transformers to represent positional information. However, existing encoding methods of a vanilla transformer are not always directly applicable to a line…

image-classificationImage ClassificationLanguage ModelingLanguage Modelling+2

Stable, Fast and Accurate: Kernelized Attention with Relative Positional Encoding

2021-06-23 · NeurIPS 2021 12 · Shengjie Luo, Shanda Li, Tianle Cai, Di He 외

The attention module, which is a crucial component in Transformer, cannot scale efficiently to long sequences due to its quadratic complexity. Many works focus on approximating the dot-then-exponentiate softmax function …

FastRPB: a Scalable Relative Positional Encoding for Long Sequence Tasks

2022-02-23 · Maksim Zubkov, Daniil Gavrilov

Transformers achieve remarkable performance in various domains, including NLP, CV, audio processing, and graph analysis. However, they do not scale well on long sequence tasks due to their quadratic complexity w.r.t. the…

Randomized Positional Encodings Boost Length Generalization of Transformers

2023-05-26 · Anian Ruoss, Grégoire Delétang, Tim Genewein, Jordi Grau-Moya 외

Transformers have impressive generalization capabilities on tasks with a fixed context length. However, they fail to generalize to sequences of arbitrary length, even for seemingly simple tasks such as duplicating a stri…

What DINO saw: ALiBi positional encoding reduces positional bias in Vision Transformers

2026-03-17 · Moritz Pawlowsky, Antonis Vamvakeros, Alexander Weiss, Anja Bielefeld 외 arxiv

Vision transformers (ViTs) - especially feature foundation models like DINOv2 - learn rich representations useful for many downstream tasks. However, architectural choices (such as positional encoding) can lead to these …