arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.15478cs.LGstat.ML
收藏

Transformer 具有表达力,但足以胜任回归任务吗?

Transformers are Expressive, But Are They Expressive Enough for Regression?

IIT Bombay(印度理工学院孟买分校)

Swaroop Nath, Harshad Khadilkar, Pushpak Bhattacharyya

AI总结:

本文通过理论证明和实验分析揭示 Transformer 难以逼近光滑函数、只能依赖分段常数近似,从而质疑其作为通用函数逼近器的能力,并呼吁更精细地理解其表达力。

摘要:

Transformer 已成为自然语言处理领域的核心架构,在机器翻译和文本摘要等应用中取得了显著成功。鉴于其被广泛采用,已有若干工作尝试分析 Transformer 的表达力。神经网络的表达力是指其能够逼近的函数类别;若一个神经网络能够充当通用函数逼近器,则称其具有完全表达力。我们尝试对 Transformer 进行同样的分析。与已有论断相反,我们的发现表明 Transformer 难以可靠地逼近光滑函数,而是依赖具有较大区间的分段常数近似。由此引出的核心问题是:“Transformer 真的是通用函数逼近器吗?”为回答这一问题,我们进行了深入的研究,提供理论见解并通过实验给出支持证据。在理论上,我们证明了 Transformer 编码器无法逼近光滑函数。在实验上,我们补充了理论结果,并表明完整的 Transformer 架构同样无法逼近光滑函数。通过揭示这些挑战,我们主张对 Transformer 的能力建立更精细化的理解。代码链接:https://github.com/swaroop-nath/transformer-expressivity。

英文摘要:

Transformers have become pivotal in Natural Language Processing, demonstrating remarkable success in applications like Machine Translation and Summarization. Given their widespread adoption, several works have attempted to analyze the expressivity of Transformers. Expressivity of a neural network is the class of functions it can approximate. A neural network is fully expressive if it can act as a universal function approximator. We attempt to analyze the same for Transformers. Contrary to existing claims, our findings reveal that Transformers struggle to reliably approximate smooth functions, relying on piecewise constant approximations with sizable intervals. The central question emerges as: ''Are Transformers truly Universal Function Approximators?'' To address this, we conduct a thorough investigation, providing theoretical insights and supporting evidence through experiments. Theoretically, we prove that Transformer Encoders cannot approximate smooth functions. Experimentally, we complement our theory and show that the full Transformer architecture cannot approximate smooth functions. By shedding light on these challenges, we advocate a refined understanding of Transformers' capabilities. Code Link: https://github.com/swaroop-nath/transformer-expressivity.

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

↑