HackerPapers

arXiv:1906.06755cs.CL

Theoretical Limitations of Self-Attention in Neural Sequence Models

Michael Hahn

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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.

arXiv comments
Accepted by: Transactions of the Association for Computational Linguistics
Journal reference
DOI
doi:10.1162/tacl_a_00306
Subjects
cs.CLComputation and Language cs.FLFormal Languages and Automata Theory cs.LGMachine Learning

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Jan 2021 to Jan 2021.

Comments linking this paper, per year.

Discussed in comments1 thread

    • The root-case of skepticism has always been that while Transformers do exceptionally well on finite-sized tasks, they lack any fully recursive understanding of the concepts.[0] A human can learn basic arithmetic, then generalize those principles to bigger number arithmetic, then…

      dcolkittView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.