HoPE: A Novel Positional Encoding Without Long-Term Decay for Enhanced Context Awareness and Extrapolation
Yuhan ChenAng Lv
Jian Luan
Bin WangWei Liu Yuhan Chen
Ang Lv

Jian Luan

Bin Wang
Wei Liu
+5
The paper argues that long-term decay, a design principle of many positional encodings (PEs), is outdated for large language models (LLMs) that need precise retrieval from arbitrary positions. Empirical analyses show models learn attention with a local-decay but global U-shape pattern, contradicting long-term decay. Analysis of RoPE identifies components causing this U-shape, which limit expressiveness and extrapolation. The authors propose High-frequency rotary Position Encoding (HoPE), which removes these components, retaining only high-frequency signals and breaking long-term decay theoretically. This removes constraints limiting attention optimization and extrapolation, enhancing context awareness and extrapolation, as validated by experiments.

arXiv ·
· October 28, 2024