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

理解Transformer在序列建模中的表达能力与机制

Understanding the Expressive Power and Mechanisms of Transformer for Sequence Modeling

School of Mathematical Sciences, Peking University(北京大学数学科学学院);AI for Science Institute Beijing(北京AI for Science研究院)

Mingze Wang, Weinan E

AI总结:

该研究系统分析Transformer序列建模的逼近性质,明确各组件及层数、头数等参数对表达能力的影响机制,通过显式逼近速率验证组合效应,理论结论经实验验证并为架构设计提供参考。

摘要:

我们针对Transformer在长程、稀疏且复杂记忆场景下的序列建模逼近性质开展了系统性研究。我们探究了Transformer的不同组件(如点积自注意力、位置编码、前馈层)影响其表达能力的机制,并通过建立显式逼近速率研究了它们的组合效应。我们的研究揭示了层数、注意力头数等Transformer关键参数的作用。这些理论洞见得到了实验验证,也为替代架构的设计提供了自然的参考方向。

英文摘要:

We conduct a systematic study of the approximation properties of Transformer for sequence modeling with long, sparse and complicated memory. We investigate the mechanisms through which different components of Transformer, such as the dot-product self-attention, positional encoding and feed-forward layer, affect its expressive power, and we study their combined effects through establishing explicit approximation rates. Our study reveals the roles of critical parameters in the Transformer, such as the number of layers and the number of attention heads. These theoretical insights are validated experimentally and offer natural suggestions for alternative architectures.

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

↑