English
Related papers

Related papers: Context-aware Biases for Length Extrapolation

200 papers

Sequential recommendation (SR), which encodes user activity to predict the next action, has emerged as a widely adopted strategy in developing commercial personalized recommendation systems. A critical component of modern SR models is the…

Information Retrieval · Computer Science 2025-02-25 Jun Yuan , Guohao Cai , Zhenhua Dong

Rotary Position Embeddings (RoPE) have been shown to effectively encode positional information in transformer-based language models. However, these models fail to generalize past the sequence length they were trained on. We present YaRN…

Computation and Language · Computer Science 2026-02-10 Bowen Peng , Jeffrey Quesnelle , Honglu Fan , Enrico Shippole

The decoder-only Transformer architecture with causal masking and relative position encoding (RPE) has become the de facto choice in language modeling. Despite its exceptional performance across various tasks, we have identified two…

Computation and Language · Computer Science 2024-02-08 Qingyu Yin , Xuzheng He , Xiang Zhuang , Yu Zhao , Jianhua Yao , Xiaoyu Shen , Qiang Zhang

Neural Machine Translation (NMT) models have traditionally used Sinusoidal Positional Embeddings (PEs), which often struggle to capture long-range dependencies and are inefficient for handling extended context or document-level translation…

Computation and Language · Computer Science 2025-02-11 Varun Gumma , Pranjal A. Chitale , Kalika Bali

In this study, we investigate the impact of positional encoding (PE) on source separation performance and the generalization ability to long sequences (length extrapolation) in Transformer-based time-frequency (TF) domain dual-path models.…

Audio and Speech Processing · Electrical Eng. & Systems 2025-06-03 Kohei Saijo , Tetsuji Ogawa

Rotary Positional Embedding (RoPE) is a widely adopted technique for encoding position in language models, which, while effective, causes performance breakdown when input length exceeds training length. Prior analyses assert (rightly) that…

Machine Learning · Computer Science 2026-03-20 Davis Wertheimer , Aozhong Zhang , Derrick Liu , Penghang Yin , Naigang Wang

Length generalization, the ability to generalize from small training context sizes to larger ones, is a critical challenge in the development of Transformer-based language models. Positional encoding (PE) has been identified as a major…

Computation and Language · Computer Science 2023-11-08 Amirhossein Kazemnejad , Inkit Padhi , Karthikeyan Natesan Ramamurthy , Payel Das , Siva Reddy

Length generalization is the ability of language models to maintain performance on inputs longer than those seen during pretraining. In this work, we introduce a simple yet powerful position encoding (PE) strategy, Random Float Sampling…

Machine Learning · Computer Science 2026-02-17 Atsushi Shimizu , Shohei Taniguchi , Yutaka Matsuo

Transformer-based Large Language Models (LLMs) have exhibited remarkable success in extensive tasks primarily attributed to self-attention mechanism, which requires a token to consider all preceding tokens as its context to compute…

Computation and Language · Computer Science 2025-08-05 Yaofo Chen , Zeng You , Shuhai Zhang , Haokun Li , Yirui Li , Yaowei Wang , Mingkui Tan

In Transformers, Position Embeddings (PEs) significantly influence Length Generalization (LG) performance, yet their fundamental role remains unclear. In this work, we investigate the limitations and capabilities of PEs in achieving LG. We…

Machine Learning · Computer Science 2025-10-07 Yang Chen , Yitao Liang , Zhouchen Lin

Positional encoding mechanisms enable Transformers to model sequential structure and long-range dependencies in text. While absolute positional encodings struggle with extrapolation to longer sequences due to fixed positional…

Computation and Language · Computer Science 2025-09-09 Chang Dai , Hongyu Shan , Mingyang Song , Di Liang

Recently, Large language models (LLMs) have revolutionized Natural Language Processing (NLP). Pretrained LLMs, due to limited training context size, struggle with handling long token sequences, limiting their performance on various…

Computation and Language · Computer Science 2024-12-11 Haoran Lian , Junmin Chen , Wei Huang , Yizhe Xiong , Wenping Hu , Guiguang Ding , Hui Chen , Jianwei Niu , Zijia Lin , Fuzheng Zhang , Di Zhang

Effectively training language models on long inputs poses many technical challenges. As a cost consideration, languages models are pretrained on a fixed sequence length before being adapted to longer sequences. We explore various methods…

Computation and Language · Computer Science 2024-06-21 Petros Karypis , Julian McAuley , George Karypis

Transformers have emerged as the architecture of choice for many state-of-the-art AI models, showcasing exceptional performance across a wide range of AI applications. However, the memory demands imposed by Transformers limit their ability…

Computation and Language · Computer Science 2023-11-28 Hao Liu , Matei Zaharia , Pieter Abbeel

We present a new class of efficient attention mechanisms applying universal 3D Relative Positional Encoding (RPE) methods given by arbitrary integrable modulation functions $f$. They lead to the new class of 3D-Transformer models, called…

Machine Learning · Computer Science 2026-05-12 Byeongchan Kim , Arijit Sehanobish , Avinava Dubey , Min-hwan Oh , Krzysztof Choromanski

A recent variation of Transformer, Performer, scales Transformer to longer sequences with a linear attention mechanism. However, it is not compatible with relative position encoding, which has advantages over absolute position encoding. In…

Computation and Language · Computer Science 2021-09-09 Peng Chen

The usage of transformers has grown from learning about language semantics to forming meaningful visiolinguistic representations. These architectures are often over-parametrized, requiring large amounts of computation. In this work, we…

Computation and Language · Computer Science 2020-07-09 Prajjwal Bhargava

Positional encodings are a core part of transformer-based models, enabling processing of sequential data without recurrence. This paper presents a theoretical framework to analyze how various positional encoding methods, including…

Machine Learning · Computer Science 2025-06-10 Yin Li

Large Language Models (LLMs) are trained with a pre-defined context length, restricting their use in scenarios requiring long inputs. Previous efforts for adapting LLMs to a longer length usually requires fine-tuning with this target length…

Computation and Language · Computer Science 2024-02-22 Dawei Zhu , Nan Yang , Liang Wang , Yifan Song , Wenhao Wu , Furu Wei , Sujian Li

Recent advances in large language models (LLMs) have enhanced their ability to process long input contexts. This development is particularly crucial for tasks that involve retrieving knowledge from an external datastore, which can result in…

Computation and Language · Computer Science 2024-04-03 Zheng Zhang , Fan Yang , Ziyan Jiang , Zheng Chen , Zhengyang Zhao , Chengyuan Ma , Liang Zhao , Yang Liu