EMNLP Findings2020
How Can Self-Attention Networks Recognize Dyck-n Languages?
Javid Ebrahimi, Dhruv Gelda, Wei Zhang
Abstract
We focus on the recognition of Dyck-n (D n ) languages with self-attention (SA) networks, which has been deemed to be a difficult task for these networks. We compare the performance of two variants of SA, one with a starting symbol (SA + ) and one without (SA -). Our results show that SA + is able to generalize to longer sequences and deeper dependencies. For D 2 , we find that SA -completely breaks down on long sequences whereas the accuracy of SA + is 58.82%. We find attention maps learned by SA + to be amenable to interpretation and compatible with a stack-based language recognizer. Surprisingly, the performance of SA networks is at par with LSTMs, which provides evidence on the ability of SA to learn hierarchies without recursion.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
28 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- What Algorithms can Transformers Learn? A Study in Length Generalization cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- What Algorithms can Transformers Learn? A Study in Length Generalization cites Thinking Like Transformers
- Thinking Like Transformers cites A Formal Hierarchy of RNN Architectures
- Masked Hard-Attention Transformers Recognize Exactly the Star-Free Languages cites Thinking Like Transformers
- What they do when in doubt: a study of inductive biases in seq2seq learners cites A Formal Hierarchy of RNN Architectures
Cited by top-tier papers28
- What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin et al.ICLR 2024 · 189 citations
- Thinking Like TransformersGail Weiss, Yoav Goldberg, Eran YahavICML 2021 · 183 citations
- How Do Transformers Learn Topic Structure: Towards a Mechanistic UnderstandingYuchen Li, Yuanzhi Li, Andrej RisteskiICML 2023 · 87 citations
- Masked Hard-Attention Transformers Recognize Exactly the Star-Free LanguagesAndy Yang, David Chiang, Dana AngluinNeurIPS 2024 · 58 citations
- The Closeness of In-Context Learning and Weight Shifting for Softmax RegressionShuai Li, Zhao Song, Yu Xia, Tong Yu et al.NeurIPS 2024 · 53 citations
Builds on3
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
- What they do when in doubt: a study of inductive biases in seq2seq learnersEugene Kharitonov, Rahma ChaabouniICLR 2021 · 29 citations
- A Formal Hierarchy of RNN ArchitecturesWilliam Merrill, Gail Weiss, Yoav Goldberg, Roy Schwartz et al.ACL 2020 · 6 citations
Related papers
- Self-Attention Networks Can Process Bounded Hierarchical LanguagesShunyu Yao, Binghui Peng, Christos H. Papadimitriou, Karthik NarasimhanACL 2021
- Can the Transformer Learn Nested Recursion with Symbol Masking?Jean-Philippe Bernardy, Adam Ek, Vladislav MaraevACL Findings 2021 · 2 citations
- On the Ability and Limitations of Transformers to Recognize Formal LanguagesSatwik Bhattamishra, Kabir Ahuja, Navin GoyalEMNLP 2020 · 7 citations
- Stack Attention: Improving the Ability of Transformers to Model Hierarchical PatternsBrian DuSell, David ChiangICLR 2024 · 15 citations
- Pushdown Layers: Encoding Recursive Structure in Transformer Language ModelsShikhar Murty, Pratyusha Sharma, Jacob Andreas, Christopher D. ManningEMNLP 2023
