paper-with-me

홈 › Papers

Remember to Forget: Gated Adaptive Positional Encoding

2026-05-11 · Riccardo Ali, Alessio Borgi, Christopher Irwin, Mario Severino, Pietro Liò arxiv

Rotary Positional Encoding (RoPE) is widely used in modern large language models. However, when sequences are extended beyond the range seen during training, rotary phases can enter out-of-distribution regimes, leading to spurious long-range alignments, diffuse attention, and degraded retrieval. Existing remedies only partially address these failures, as they often trade local positional resolution for long-context stability. We propose GAPE (Gated Adaptive Positional Encoding), a drop-in augmentation for positional encodings that introduces a content-aware bias directly into the attention logits while preserving the rotary geometry. GAPE decouples distance-based suppression from token importance through a query-dependent gate that contracts irrelevant context and a key-dependent gate that preserves salient distant tokens. We prove that protected tokens remain accessible, while the attention mass assigned to unprotected distant tokens decays as a function of the query gate. We further show that GAPE can be implemented within standard scaled dot-product attention. We validate these properties empirically, finding that GAPE consistently yields sharper attention and improved long-context robustness over rotary baselines across both synthetic retrieval and long-context benchmarks.

📄 PDF Abstract BibTeX arXiv:2605.10414

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Gated Orthogonal Recurrent Units: On Learning to Forget

2017-06-08 · Li Jing, Caglar Gulcehre, John Peurifoy, Yichen Shen 외

We present a novel recurrent neural network (RNN) based model that combines the remembering ability of unitary RNNs with the ability of gated RNNs to effectively forget redundant/irrelevant information in its memory. We …

DenoisingQuestion Answering

Shared memories driven by the intrinsic memorability of items

2021-04-14 · Wilma A. Bainbridge

When we experience an event, it feels like our previous experiences, our interpretations of that event (e.g., aesthetics, emotions), and our current state will determine how we will remember it. However, recent work has …

Do You Remember? Overcoming Catastrophic Forgetting for Fake Audio Detection

2023-08-07 · Xiaohui Zhang, Jiangyan Yi, JianHua Tao, Chenglong Wang 외

Current fake audio detection algorithms have achieved promising performances on most datasets. However, their performance may be significantly degraded when dealing with audio of a different dataset. The orthogonal weigh…

Continual LearningEmotion RecognitionSpeech Emotion Recognition

Forgetting in order to Remember Better

2018-12-12

In human memory, forgetting occur rapidly after the remembering and the rate of forgetting slowed down as time went. This is so-called the Ebbinghaus forgetting curve. There are many explanations of how this curve occur …

Learning by Active Forgetting for Neural Networks

2021-11-21 · Jian Peng, Xian Sun, Min Deng, Chao Tao 외

Remembering and forgetting mechanisms are two sides of the same coin in a human learning-memory system. Inspired by human brain memory mechanisms, modern machine learning systems have been working to endow machine with l…

Lifelong learning