paper-with-me

Papers

Linearized Relative Positional Encoding

2023-07-18 · Zhen Qin, Weixuan Sun, Kaiyue Lu, Hui Deng, Dongxu Li, Xiaodong Han, Yuchao Dai, Lingpeng Kong, Yiran Zhong

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 linear transformer, because the latter requires a decomposition of the query and key representations into separate kernel functions. Nevertheless, principles for designing encoding methods suitable for linear transformers remain understudied. In this work, we put together a variety of existing linear relative positional encoding approaches under a canonical form and further propose a family of linear relative positional encoding algorithms via unitary transformation. Our formulation leads to a principled framework that can be used to develop new relative positional encoding methods that preserve linear space-time complexity. Equipped with different models, the proposed linearized relative positional encoding (LRPE) family derives effective encoding for various applications. Experiments show that compared with existing methods, LRPE achieves state-of-the-art performance in language modeling, text classification, and image classification. Meanwhile, it emphasizes a general paradigm for designing broadly more relative positional encoding methods that are applicable to linear transformers. The code is available at https://github.com/OpenNLPLab/Lrpe.

📄 PDF Abstract BibTeX arXiv:2307.09270

Code (0)

등록된 구현이 없습니다.

Tasks

image-classificationImage ClassificationLanguage ModelingLanguage Modellingtext-classificationText Classification

Similar Papers 제목 키워드 기반

Analysis of Positional Encodings for Neural Machine Translation

2019-11-01 · EMNLP (IWSLT) 2019 11 · Jan Rosendahl, Viet Anh Khoa Tran, Weiyue Wang, Hermann Ney

In this work we analyze and compare the behavior of the Transformer architecture when using different positional encoding methods. While absolute and relative positional encoding perform equally strong overall, we show t…

Machine TranslationSentenceTranslation

Investigating the Effect of Relative Positional Embeddings on AMR-to-Text Generation with Structural Adapters

2023-02-12 · Sebastien Montella, Alexis Nasr, Johannes Heinecke, Frederic Bechet 외

Text generation from Abstract Meaning Representation (AMR) has substantially benefited from the popularized Pretrained Language Models (PLMs). Myriad approaches have linearized the input graph as a sequence of tokens to …

Abstract Meaning RepresentationAMR-to-Text GenerationLink PredictionPosition+1

Cameras as Relative Positional Encoding

2025-07-14 · RuiLong Li, Brent Yi, Junchen Liu, Hang Gao 외

Transformers are increasingly prevalent for multi-view computer vision tasks, where geometric relationships between viewpoints are critical for 3D perception. To leverage these relationships, multi-view transformers must…

Depth EstimationNovel View SynthesisStereo Depth Estimation

Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolation

2024-01-29 · Zhenyu He, Guhao Feng, Shengjie Luo, Kai Yang 외

In this work, we leverage the intrinsic segmentation of language sequences and design a new positional encoding method called Bilevel Positional Encoding (BiPE). For each position, our BiPE blends an intra-segment encodi…

DisentanglementPosition

Position-aware Self-attention with Relative Positional Encodings for Slot Filling

2018-07-09 · Ivan Bilan, Benjamin Roth

This paper describes how to apply self-attention with relative positional encodings to the task of relation extraction. We propose to use the self-attention encoder layer together with an additional position-aware attent…

PositionRelation ExtractionSentenceslot-filling+1