paper-with-me

홈 › Papers

Logical Languages Accepted by Transformer Encoders with Hard Attention

2023-10-05 · Pablo Barcelo, Alexander Kozachinskiy, Anthony Widjaja Lin, Vladimir Podolskii

We contribute to the study of formal languages that can be recognized by transformer encoders. We focus on two self-attention mechanisms: (1) UHAT (Unique Hard Attention Transformers) and (2) AHAT (Average Hard Attention Transformers). UHAT encoders are known to recognize only languages inside the circuit complexity class ${\sf AC}^0$, i.e., accepted by a family of poly-sized and depth-bounded boolean circuits with unbounded fan-ins. On the other hand, AHAT encoders can recognize languages outside ${\sf AC}^0$), but their expressive power still lies within the bigger circuit complexity class ${\sf TC}^0$, i.e., ${\sf AC}^0$-circuits extended by majority gates. We first show a negative result that there is an ${\sf AC}^0$-language that cannot be recognized by an UHAT encoder. On the positive side, we show that UHAT encoders can recognize a rich fragment of ${\sf AC}^0$-languages, namely, all languages definable in first-order logic with arbitrary unary numerical predicates. This logic, includes, for example, all regular languages from ${\sf AC}^0$. We then show that AHAT encoders can recognize all languages of our logic even when we enrich it with counting terms. We apply these results to derive new results on the expressive power of UHAT and AHAT up to permutation of letters (a.k.a. Parikh images).

📄 PDF Abstract BibTeX arXiv:2310.03817

Code (0)

등록된 구현이 없습니다.

Tasks

Hard Attention

Methods 이 논문이 사용한 방법론

Focus 설명 없음

Similar Papers 제목 키워드 기반

Formal Language Recognition by Hard Attention Transformers: Perspectives from Circuit Complexity

2022-04-13 · Yiding Hao, Dana Angluin, Robert Frank

This paper analyzes three formal models of Transformer encoders that differ in the form of their self-attention mechanism: unique hard attention (UHAT); generalized unique hard attention (GUHAT), which generalizes UHAT; …

Hard Attention

Comparison of different Unique hard attention transformer models by the formal languages they can recognize

2025-06-03 · Leonid Ryvkin

This note is a survey of various results on the capabilities of unique hard attention transformers encoders (UHATs) to recognize formal languages. We distinguish between masked vs. non-masked, finite vs. infinite image a…

Hard AttentionSurvey

Tighter Bounds on the Expressivity of Transformer Encoders

2023-01-25 · David Chiang, Peter Cholak, Anand Pillay

Characterizing neural networks in terms of better-understood formal systems has the potential to yield new insights into the power and limitations of these networks. Doing so for transformers remains an active area of re…

Multilingual Probing of Deep Pre-Trained Contextual Encoders

2019-09-01 · WS 2019 9 · Vinit Ravishankar, Memduh G{\"o}k{\i}rmak, Lilja {\O}vrelid, Erik Velldal

Encoders that generate representations based on context have, in recent years, benefited from adaptations that allow for pre-training on large text corpora. Earlier work on evaluating fixed-length sentence representation…

DiagnosticSentence

Investigating Language Relationships in Multilingual Sentence Encoders Through the Lens of Linguistic Typology

2022-09-01 · CL (ACL) 2022 9 · Rochelle Choenni, Ekaterina Shutova

Multilingual sentence encoders have seen much success in cross-lingual model transfer for downstream NLP tasks. The success of this transfer is, however, dependent on the model’s ability to encode the patterns of cross-l…

SentenceXLM-R