arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.15923stat.MLcs.LG
收藏

基于非正交嵌入的Transformer学习回忆

Learning to Recall with Transformers Beyond Orthogonal Embeddings

University of Toronto and Vector Institute(多伦多大学和向量研究所);Flatiron Institute(Flatiron研究所);University of Southern California(南加州大学);New York University and Flatiron Institute(纽约大学和Flatiron研究所)

Nuri Mert Vural, Alberto Bietti, Mahdi Soltanolkotabi, Denny Wu

AI总结:

本文研究了在非正交嵌入条件下,单层Transformer在简单token检索任务中的存储容量,揭示了样本量、嵌入维度和序列长度之间的乘积关系。

摘要:

现代大型语言模型(LLMs)在需要存储和检索知识的任务中表现出色,如事实回忆和问答。Transformer是这种能力的核心,因为它们可以在训练期间编码信息并在推理时检索。现有的理论分析通常在理想化假设下研究Transformer,如无限数据或正交嵌入。然而,在现实设置中,模型是在有限数据集上训练的,具有非正交(随机)嵌入。本文通过分析一个使用随机嵌入的单层Transformer在简单token检索任务中的训练,其中模型必须在长度为L的序列中识别信息性token,并学习token到标签的一一映射。我们的分析跟踪梯度下降的“早期阶段”,并为模型的存储容量提供显式公式,揭示了样本量N、嵌入维度d和序列长度L之间的乘积依赖关系。我们通过数值验证这些标度,并进一步用底层统计问题的下界补充它们,证明在非正交嵌入下这种乘积标度是内在的。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑