arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.12166cs.LG
收藏

Attention Enables Zero Approximation Error

The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));City University of Hong Kong(香港城市大学);University of California, Los Angeles(加利福尼亚大学洛杉矶分校)

Zhiying Fang, Yidong Ouyang, Ding-Xuan Zhou, Guang Cheng

英文摘要:

Deep learning models have been widely applied in various aspects of daily life. Many variant models based on deep learning structures have achieved even better performances. Attention-based architectures have become almost ubiquitous in deep learning structures. Especially, the transformer model has now defeated the convolutional neural network in image classification tasks to become the most widely used tool. However, the theoretical properties of attention-based models are seldom considered. In this work, we show that with suitable adaptations, the single-head self-attention transformer with a fixed number of transformer encoder blocks and free parameters is able to generate any desired polynomial of the input with no error. The number of transformer encoder blocks is the same as the degree of the target polynomial. Even more exciting, we find that these transformer encoder blocks in this model do not need to be trained. As a direct consequence, we show that the single-head self-attention transformer with increasing numbers of free parameters is universal. These surprising theoretical results clearly explain the outstanding performances of the transformer model and may shed light on future modifications in real applications. We also provide some experiments to verify our theoretical result.

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

↑