by Michael Hahn
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.
Reference:
Theoretical limitations of self-attention in neural sequence modelsMichael HahnTransactions of the Association for Computational Linguistics, 2020.
Bibtex Entry:
@article{Hahn-2019-arxiv,
author = {Michael Hahn},
title = {Theoretical limitations of self-attention in neural sequence models},
journal = {Transactions of the Association for Computational Linguistics},
volume = {8},
number = {},
pages = {156-171},
year = {2020},
month = {October},
doi = {10.1162/tacl\_a\_00306},
png = {figs/transformers.png},
URL = {
https://doi.org/10.1162/tacl_a_00306
},
slides={files/acl2020-selfattention.pdf},
preprint = {https://arxiv.org/abs/1906.06755},
supplement = {files/transformers-proof.pdf},
,
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. }
}