arXiv Machine Learning

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.

arXiv Computation and Language
Sep 11

Distance generalization in transformers: why bother with positional encoding?

The paper investigates distance generalization in transformer models, focusing on how well they can handle changes in inter-token distances between training and inference while keeping context length fixed. Using two synthetic delay-copy tasks that require copying tokens after finite delays, the authors evaluate the impact of positional encoding schemes (RoPE, ALiBi, and NoPE), the diversity of distances seen during training, and the conditions under which distance transfer learning is beneficial or detrimental. Their comprehensive study highlights the importance of understanding the underlying mechanisms that govern distance generalization in transformers.

By Daniel Henrik Nevermann, Claudius Gros
arXiv Machine Learning
Jun 25

Why Do Accumulated Transformations Extrapolate?

arXiv:2606. 24975v1 Announce Type: new Abstract: PaTH Attention showed that replacing RoPE's position-indexed rotations with accumulated data-dependent Householder reflections yields strong length extrapolation, though performance degrades at extreme context lengths.

By Mahesh Godavarti
arXiv AI
Oct 7

Recurrent Looped Transformer

The Recurrent Looped Transformer (RLT) divides its layers into a parallel causal encoder and a recurrent decoder, allowing the computation path to grow with sequence length while keeping a fixed per-token cost. Experiments on six algorithmic tasks show that RLT outperforms a standard eight‑layer Transformer, achieving perfect generalization on parity up to 256 bits and high accuracy on swap‑based permutation tracking and modular arithmetic beyond training lengths. Ablation studies confirm that the recurrent feedback is essential for these gains, with chunked updates preserving performance on parity but reducing accuracy on permutation tracking.

By Yifan Zhang, Jichen Feng, Shihan Qin
arXiv Machine Learning
Oct 8

A Self-Pruning Transformer: Extreme KV-Cache Compression with Universal Attention

The paper introduces Universal Attention, a transformer architecture that unifies and extends decay-based KV‑cache pruning mechanisms while preserving RoPE embeddings and Softmax attention. It achieves highly expressive, end‑to‑end trainable pruning that adaptively removes low‑contribution tokens, yielding up to 10× compression on standard datasets and 25× compression at 16k context length without sacrificing downstream performance. The approach outperforms existing state‑of‑the‑art baselines and unpruned models in both compression and generalization.

By Davis Wertheimer, Haochen Shen, Ahan Gupta, Derrick Liu, Yu Chin Fabian Lim, Mudhakar Srivatsa, Raghu K. Ganti, Minjia Zhang, Naigang Wang
arXiv AI
Jun 29

The Context-Ready Transformer

arXiv:2606. 27538v1 Announce Type: cross Abstract: We introduce the context-ready transformer, a new recurrent neural network architecture built from a D-layer transformer block that pre-contextualizes each token before it enters the block.

By Mahesh Godavarti
arXiv Machine Learning
Jul 27

Indexing: the Beginning and the End

arXiv:2607. 22361v1 Announce Type: new Abstract: We study information bottlenecks in modern deep-learning architectures -- RNNs, softmax transformers, linear-attention transformers and state-space models -- through the lens of the indexing primitive.

By Alexander Kozachinskiy, Vicente Opazo, Felipe Urrutia