Bowen Zhou, Ning Ding, Yuchen Fan, Youbang Sun, Biqing Qi, Kaiyan Zhang, Ermo Hua, Xuekai Zhu, Xingtai Lv, Che Jiang
We have not lifted any functions out of this paper's repositories yet, so there is nothing we have run. The repositories linked to it are listed below.
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Extending the context length of Language Models (LMs) by improving Rotary Position Embedding (RoPE) has become a trend. While prior works mainly address RoPE's limitations within attention, this paper uncovers the adverse effects on length generalization from nearly all parts of LMs. Using Discrete Signal Processing theory, we show that RoPE enables periodic attention by implicitly achieving Non-Uniform Discrete Fourier Transform. However, this periodicity is undermined by the spectrum damage caused by: 1) linear layers and activation functions; 2) insufficiently trained frequency components brought by time-domain truncation. Building on our observations, we propose Fourier Position Embedding (FoPE), which enhances attention's frequency-domain properties to improve both its periodic extension and length generalization. FoPE constructs Fourier Series and zero-outs the destructive frequency components, increasing model robustness against the spectrum damage. Experiments across various model scales and benchmarks show that, within varying context windows, FoPE maintains a more stable performance compared to other baselines. Several analyses and ablations bring further support to our method and theoretical modeling.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2412.17739")
get_code_for_paper("2412.17739")
have("2412.17739")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2412.17739.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2412.17739)
Connect an agent — have() is free.