arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2503.22076cs.LG
收藏

简洁单层Transformer能进行函数求值(有时)

Concise One-Layer Transformers Can Perform Dictionary Lookup

Umeå University(于默奥大学);Yale University(耶鲁大学)

Anton Hampe, Lena Strobl, Dana Angluin, Robert Frank

AI总结:

本文研究简洁单层Transformer能否执行从[n]到[n]的任意函数求值任务,证明在特定输入表示下可行,但在函数输入和值仅编码于不同位置时不可行;简洁两层Transformer在更困难表示下也能完成,实验验证了理论结果与实际可学习性的大致对齐。

摘要:

虽然Transformer在一系列任务中已被证明非常成功,但其作为计算模型的基本性质尚未被充分理解。本文致力于研究Transformer的表达能力,重点关注其在给定参数下评估从$[n]$到$[n]$的任意函数这一基本计算任务的能力。我们证明,简洁的1层Transformer(即头数、嵌入维度和精度的乘积具有多对数界限)在输入的某些表示下能够完成此任务,但当函数的输入和值仅编码在不同的输入位置时则不能。简洁的2层Transformer即使在更困难的输入表示下也能执行该任务。实验上,我们发现了我们证明的简洁Transformer可计算的内容与实际可学习的内容之间的大致对齐。

英文摘要:

While transformers have proven enormously successful in a range of tasks, their fundamental properties as models of computation are not well understood. This paper contributes to the study of the expressive capacity of transformers, focusing on their ability to perform the fundamental computational task of looking up a key in a dictionary. We prove that concise 1-layer transformers (i.e., with a polylog bound on the product of the number of heads, the embedding dimension, and precision) can perform this task when the key and value are represented in the same input position, but, under the $p$-bit rational precision assumption, cannot perform it when the keys and values are represented in different input positions. Concise 2-layer transformers can perform the task in the second case. Experimentally, we find an alignment between what we have proven can be computed by concise transformers and what can be practically learned.

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

↑