Low-Dimension-to-High-Dimension Generalization And Its Implications for Length Generalization

Yang Chen, Yitao Liang, Zhouchen Lin · DOI

Abstract

Length generalization—the ability of a model to perform on tasks larger than those seen during training—remains a significant challenge for Transformer-based architectures. This paper proposes a novel perspective by redefining length generalization as a transition from low-dimensional to high-dimensional (LDHD) subspaces. We distinguish between the inherent mathematical complexity of a task and the "nuisance" of data formatting. We prove a "No-Free-Lunch" theorem for LDHD generalization, establishing that specific inductive biases are required for success. Furthermore, we introduce RPE-Square, a relative position embedding that utilizes anchor tokens to maintain structural alignment. Empirical results on synthetic reasoning tasks demonstrate that RPE-Square significantly improves generalization over standard methods like RoPE and ALiBi.

1. Introduction: The Scaling vs. Formatting Dilemma

Large Language Models (LLMs) often struggle with basic arithmetic when input lengths exceed training bounds. The authors argue that this "length generalization" failure stems from two conflated issues: the scaling challenge (mathematical complexity) and the data format nuisance (string representation variability). By isolating these factors, we can better understand the fundamental limits of model generalization.

2. Formalizing LDHD Generalization

The core contribution of this work is the formalization of Low-Dimension-to-High-Dimension (LDHD) generalization. In this framework, training data is restricted to a low-dimensional manifold, while testing requires the model to operate in a higher-dimensional space.

Comparison of In-Distribution, Typical OOD, and LDHD generalization regimes.

As illustrated in Figure 1, LDHD generalization (c) differs from typical Out-of-Distribution (OOD) generalization (b). In LDHD, the model must extrapolate its learned function into dimensions it has never explored. The authors prove that without a specific inductive bias—prior knowledge about the target function's structure—no algorithm can consistently achieve LDHD generalization.

3. Inductive Bias and the RPE-Square Solution

The paper analyzes how architectural choices, such as Position-Only Linear Attention (PLAA), impose inductive biases. These models often act as "min-degree interpolators," favoring the simplest possible function that fits the training data. If the true task requires a more complex high-dimensional mapping, the model will fail.

To address the "data format nuisance," the authors propose RPE-Square. Standard Relative Position Encoding (RPE) measures the distance between tokens, which breaks when the distance between key elements (like numbers in an equation) changes. RPE-Square instead calculates the "relative distance of relative distances" by identifying anchor tokens (e.g., +, =) and measuring positions relative to these landmarks. This ensures the model's coordinate system remains invariant to formatting shifts.

4. Empirical Evaluation

The researchers tested RPE-Square against standard embeddings (RoPE, ALiBi, Abacus) on a suite of synthetic tasks, including unaligned copy, addition, and bitwise parity.

Accuracy comparison between standard RPE and the proposed RPE-Square on unaligned tasks.

In the "Unaligned Copy" task (Figure 2), standard RPE accuracy collapses as the problem scale increases. RPE-Square, however, maintains near-perfect performance. Similar results were observed in arithmetic tasks; for instance, in Unaligned Reverse Format (URF) addition, RPE-Square generalized from 4-digit training to 5-digit testing, while other models failed.

5. Conclusion and Future Directions

This work provides a rigorous mathematical framework for length generalization through the lens of LDHD transitions. RPE-Square emerges as a robust architectural solution for handling unaligned data formats. While these results are promising, future research is needed to validate these principles in large-scale, non-linear LLMs and more diverse reasoning contexts.

Summary updated

BibTeX
@inproceedings{chen2025low,
  author = {Yang Chen and Yitao Liang and Zhouchen Lin},
  title = {{Low-Dimension-to-High-Dimension Generalization And Its Implications for Length Generalization}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=ZSXHilmAgR},
}
Figure