Learning in Compact Spaces with Approximately Normalized Transformers

J. Franke, Urs Spiegelhalter, Marianna Nezhurina, J. Jitsev, Frank Hutter +1 more
5/1/2025
transformer-attention

No confident code implementation found for this paper.

Abstract

The successful training of deep neural networks requires addressing challenges such as overfitting, numerical instabilities leading to divergence, and increasing variance in the residual stream. A common solution is to apply regularization and normalization techniques that usually require tuning additional hyperparameters.

Show full abstract

An alternative is to force all parameters and representations to lie on a hypersphere. This removes the need for regularization and increases convergence speed, but comes with additional costs. In this work, we propose a more holistic, approximate normalization via simple scalar multiplications motivated by the tight concentration of the norms of high-dimensional random vectors. Additionally, instead of applying strict normalization for the parameters, we constrain their norms. These modifications remove the need for weight decay and learning rate warm-up as well, but do not increase the total number of normalization layers. Our experiments with transformer architectures show up to 40% faster convergence compared to GPT models with QK normalization, with only 3% additional runtime cost. When deriving scaling laws, we found that our method enables training with larger batch sizes while preserving the favorable scaling characteristics of classic GPT architectures.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{franke2025learning,
  title  = {Learning in Compact Spaces with Approximately Normalized Transformers},
  author = {J. Franke and Urs Spiegelhalter and Marianna Nezhurina and J. Jitsev and Frank Hutter and Michael Hefenbrock},
  year   = {2025},
  eprint = {2505.22014},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.22014},
  url    = {https://doi.org/10.48550/arXiv.2505.22014},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.22014.svg)](https://codeofpaper.com/paper/2505.22014)

Discussion