arXiv Machine Learning By Subham Singh, Ashutosh Mishra, Subha Raut

Relative Positions Generalize, Absolute Positions Memorize: An Implicit-Bias Account of Length Generalization in Attention

Read the original on arXiv Machine Learning →

arXiv:2607. 18759v1 Announce Type: new Abstract: Transformers with relative positional encodings often extrapolate to sequences longer than those seen during training, whereas transformers with learned absolute encodings typically do not.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv Machine Learning.

arXiv Machine Learning
Oct 22

Copying Under Repetition: From Prefix Matching to Position Hashing

The paper investigates how large language models can accurately copy long repeated strings, a task that standard transformers struggle with due to overrun or truncation. It proposes a two‑layer transformer using RoPE‑style rotations (VO‑rotations) with small prime periods to encode distances modulo primes, enabling the model to distinguish all necessary positions via the Chinese Remainder Theorem and correctly terminate copying. Experiments show that baseline transformers fail on long repeats, while the VO‑based model generalizes to lengths up to about 5005 with near‑perfect accuracy.

By Anxin Guo, Tianlong Huang, Chenxiao Yang, Zhiyuan Li