Learning to Recall with Transformers Beyond Orthogonal Embeddings

Nuri Mert Vural, Alberto Bietti, Mahdi Soltanolkotabi, Denny Wu
3/16/2026
stat.MLcs.LG

No confident code implementation found for this paper.

Abstract

Modern large language models (LLMs) excel at tasks that require storing and retrieving knowledge, such as factual recall and question answering. Transformers are central to this capability because they can encode information during training and retrieve it at inference. Existing theoretical analyses typically study transformers under idealized assumptions such as infinite data or orthogonal embeddings. In realistic settings, however, models are trained on finite datasets with non-orthogonal (random) embeddings. We address this gap by analyzing a single-layer transformer with random embeddings trained with (empirical) gradient descent on a simple token-retrieval task, where the model must identify an informative token within a length-$L$ sequence and learn a one-to-one mapping from tokens to labels. Our analysis tracks the ``early phase'' of gradient descent and yields explicit formulas for the model's storage capacity -- revealing a multiplicative dependence between sample size $N$, embedding dimension $d$, and sequence length $L$. We validate these scalings numerically and further complement them with a lower bound for the underlying statistical problem, demonstrating that this multiplicative scaling is intrinsic under non-orthogonal embeddings.

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{vural2026learning,
  title  = {Learning to Recall with Transformers Beyond Orthogonal Embeddings},
  author = {Nuri Mert Vural and Alberto Bietti and Mahdi Soltanolkotabi and Denny Wu},
  year   = {2026},
  eprint = {2603.15923},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.15923v1}
}

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/2603.15923.svg)](https://codeofpaper.com/paper/2603.15923)

Discussion