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

神经序列模型中自注意的理论局限性

Theoretical Limitations of Self-Attention in Neural Sequence Models

Stanford University(斯坦福大学)

Michael Hahn

摘要:

Transformers正在成为NLP的新主力,在各种任务中取得了巨大的成功。与LSTM不同,Transformers完全通过自我注意来处理输入序列。以前的工作表明,自我注意处理层次结构的计算能力是有限的。在这项工作中,我们从数学上研究了自注意模型形式语言的计算能力。在软注意力和硬注意力中,我们展示了自我注意力计算能力的强大理论局限性,发现它不能模拟周期性有限状态语言,也不能模拟层次结构,除非层或头的数量随输入长度增加。考虑到自我注意的实际成功和语言学中层次结构的突出作用,这些局限性似乎令人惊讶,这表明自然语言可以很好地近似于理论语言学中通常假设的形式语言的模型。

英文摘要:

Transformers are emerging as the new workhorse of NLP, showing great success across tasks. Unlike LSTMs, transformers process input sequences entirely through self-attention. Previous work has suggested that the computational capabilities of self-attention to process hierarchical structures are limited. In this work, we mathematically investigate the computational power of self-attention to model formal languages. Across both soft and hard attention, we show strong theoretical limitations of the computational abilities of self-attention, finding that it cannot model periodic finite-state languages, nor hierarchical structure, unless the number of layers or heads increases with input length. These limitations seem surprising given the practical success of self-attention and the prominent role assigned to hierarchical structure in linguistics, suggesting that natural language can be approximated well with models that are too weak for the formal languages typically assumed in theoretical linguistics.

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

↑