English
Related papers

Related papers: Context-aware Biases for Length Extrapolation

200 papers

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 string. Moreover, simply…

Fixed representational capacity is a fundamental constraint in continual learning: practitioners must guess an appropriate model width before training, without knowing how many distinct concepts the data contains. We propose LACE…

Machine Learning · Computer Science 2026-03-31 Shivnath Tathe

Many positional encodings (PEs) are designed to exhibit long-term decay, based on an entrenched and long-standing inductive opinion: tokens farther away from the current position carry less relevant information. We argue that long-term…

Computation and Language · Computer Science 2024-12-06 Yuhan Chen , Ang Lv , Jian Luan , Bin Wang , Wei Liu

This paper introduces a novel approach to position embeddings in transformer models, named "Exact Positional Embeddings" (ExPE). An absolute positional embedding method that can extrapolate to sequences of lengths longer than the ones it…

Computation and Language · Computer Science 2025-10-06 Aleksis Datseris , Sylvia Vassileva , Ivan Koychev , Svetla Boytcheva

Positional encoding is a vital component of Transformer architectures, enabling models to incorporate sequence order into self-attention mechanisms. Rotary Positional Embeddings (RoPE) have become a widely adopted solution due to their…

Computation and Language · Computer Science 2025-08-01 Ali Veisi , Delaram Fartoot , Hamidreza Amirzadeh

An ideal length-extrapolatable Transformer language model can handle sequences longer than the training length without any fine-tuning. Such long-context utilization capability relies heavily on a flexible positional embedding design. Upon…

Computation and Language · Computer Science 2023-11-16 Ta-Chung Chi , Ting-Han Fan , Alexander I. Rudnicky

Modern large language models (LLMs) that rely on attention mechanisms are typically trained with fixed context lengths which enforce upper limits on the length of input sequences that they can handle at evaluation time. To use these models…

Artificial Intelligence · Computer Science 2023-08-22 Arka Pal , Deep Karkhanis , Manley Roberts , Samuel Dooley , Arvind Sundararajan , Siddartha Naidu

Relative Positional Encoding (RPE), which encodes the relative distance between any pair of tokens, is one of the most successful modifications to the original Transformer. As far as we know, theoretical understanding of the RPE-based…

Machine Learning · Computer Science 2022-10-31 Shengjie Luo , Shanda Li , Shuxin Zheng , Tie-Yan Liu , Liwei Wang , Di He

The attention mechanism is a fundamental component of the Transformer model, contributing to interactions among distinct tokens, in contrast to earlier feed-forward neural networks. In general, the attention scores are determined simply by…

Computation and Language · Computer Science 2024-10-11 Chuanyang Zheng , Yihang Gao , Han Shi , Jing Xiong , Jiankai Sun , Jingyao Li , Minbin Huang , Xiaozhe Ren , Michael Ng , Xin Jiang , Zhenguo Li , Yu Li

Diffusion transformers (DiTs) struggle to generate images at resolutions higher than their training resolutions. The primary obstacle is that the explicit positional encodings(PE), such as RoPE, need extrapolating to unseen positions which…

Computer Vision and Pattern Recognition · Computer Science 2025-09-25 Shen Zhang , Siyuan Liang , Yaning Tan , Zhaowei Chen , Linze Li , Ge Wu , Yuhao Chen , Shuheng Li , Zhenyu Zhao , Caihua Chen , Jiajun Liang , Yao Tang

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…

Machine Learning · Computer Science 2021-06-11 Antoine Liutkus , Ondřej Cífka , Shih-Lun Wu , Umut Şimşekli , Yi-Hsuan Yang , Gaël Richard

End-to-end (E2E) automatic speech recognition (ASR) systems often have difficulty recognizing uncommon words, that appear infrequently in the training data. One promising method, to improve the recognition accuracy on such rare words, is to…

Computation and Language · Computer Science 2021-11-08 Feng-Ju Chang , Jing Liu , Martin Radfar , Athanasios Mouchtaris , Maurizio Omologo , Ariya Rastrow , Siegfried Kunzmann

We propose a conditional positional encoding (CPE) scheme for vision Transformers. Unlike previous fixed or learnable positional encodings, which are pre-defined and independent of input tokens, CPE is dynamically generated and conditioned…

Computer Vision and Pattern Recognition · Computer Science 2023-02-14 Xiangxiang Chu , Zhi Tian , Bo Zhang , Xinlong Wang , Chunhua Shen

Transformer-based Large Language Models (LLMs) are pioneering advances in many natural language processing tasks, however, their exceptional capabilities are restricted within the preset context window of Transformer. Position Embedding…

Computation and Language · Computer Science 2024-03-26 Guanzheng Chen , Xin Li , Zaiqiao Meng , Shangsong Liang , Lidong Bing

Extending context window sizes allows large language models (LLMs) to process longer sequences and handle more complex tasks. Rotary Positional Embedding (RoPE) has become the de facto standard due to its relative positional encoding…

Computation and Language · Computer Science 2024-11-27 Haonan Wang , Qian Liu , Chao Du , Tongyao Zhu , Cunxiao Du , Kenji Kawaguchi , Tianyu Pang

Self-attention and position embedding are two key modules in transformer-based Large Language Models (LLMs). However, the potential relationship between them is far from well studied, especially for long context window extending. In fact,…

Machine Learning · Computer Science 2024-02-29 Shiyi Zhu , Jing Ye , Wei Jiang , Siqiao Xue , Qi Zhang , Yifan Wu , Jianguo Li

By incorporating additional contextual information, deep biasing methods have emerged as a promising solution for speech recognition of personalized words. However, for real-world voice assistants, always biasing on such personalized words…

Sound · Computer Science 2023-08-16 Tianyi Xu , Zhanheng Yang , Kaixun Huang , Pengcheng Guo , Ao Zhang , Biao Li , Changru Chen , Chao Li , Lei Xie

Long-context modeling presents a significant challenge for transformer-based large language models (LLMs) due to the quadratic complexity of the self-attention mechanism and issues with length extrapolation caused by pretraining exclusively…

Computation and Language · Computer Science 2024-05-24 Chenghao Yang , Zi Yang , Nan Hua

Large Language Models (LLMs) often struggle to process and generate coherent context when the number of input tokens exceeds the pre-trained length. Recent advancements in long-context extension have significantly expanded the context…

Computation and Language · Computer Science 2025-04-29 Yi Lu , Wanxu Zhao , Xin Zhou , Chenxin An , Chenglong Wang , Shuo Li , Yuming Yang , Jun Zhao , Tao Ji , Tao Gui , Qi Zhang , Xuanjing Huang

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 in the original…

Machine Learning · Computer Science 2021-11-04 Shengjie Luo , Shanda Li , Tianle Cai , Di He , Dinglan Peng , Shuxin Zheng , Guolin Ke , Liwei Wang , Tie-Yan Liu