paper-with-me

Papers

Context-Free Recognition with Transformers

2026-01-05 · Selim Jerad, Anej Svete, Sophie Hao, Ryan Cotterell, William Merrill arxiv

Transformers excel empirically on tasks that process well-formed inputs according to some grammar, such as natural language and code. However, it remains unclear how they can process grammatical syntax. In fact, under standard complexity conjectures, standard transformers cannot recognize context-free languages (CFLs), a canonical formalism to describe syntax, or even regular languages, a subclass of CFLs. Past work has shown that $\mathcal{O}(\log(N))$ looping layers (w.r.t. input length $N$) allow transformers to recognize regular languages, but the question of context-free recognition with looped transformers remained open. In this work, we show that looped transformers with $\mathcal{O}(\log(N))$ looping layers and $\mathcal{O}(N^6)$ padding symbols can recognize all CFLs. However, training and inference with $\mathcal{O}(N^6)$ padding symbols is potentially impractical. Fortunately, we show that, for natural subclasses such as unambiguous CFLs, the recognition problem on transformers becomes more tractable, requiring $\mathcal{O}(N^3)$ padding. Empirically, looped and padded transformers perform better than fixed-depth transformers in recognizing CFLs. Overall, our results shed light on the intricacy of CFL recognition by transformers: while general recognition may require an intractable amount of padding, natural constraints such as unambiguity yield efficient recognition algorithms.

📄 PDF Abstract BibTeX arXiv:2601.01754

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Efficient Attention-free Video Shift Transformers

2022-08-23 · Adrian Bulat, Brais Martinez, Georgios Tzimiropoulos

This paper tackles the problem of efficient video recognition. In this area, video transformers have recently dominated the efficiency (top-1 accuracy vs FLOPs) spectrum. At the same time, there have been some attempts i…

Action RecognitionVideo Recognition

An Attention Free Transformer

2021-05-28 · Shuangfei Zhai, Walter Talbott, Nitish Srivastava, Chen Huang 외

We introduce Attention Free Transformer (AFT), an efficient variant of Transformers that eliminates the need for dot product self attention. In an AFT layer, the key and value are first combined with a set of learned pos…

Position

Persian Speech Emotion Recognition by Fine-Tuning Transformers

2024-02-11 · Minoo Shayaninasab, Bagher BabaAli

Given the significance of speech emotion recognition, numerous methods have been developed in recent years to create effective and efficient systems in this domain. One of these methods involves the use of pretrained tra…

Emotion RecognitionSelf-Supervised LearningSpeech Emotion Recognition

Vision Transformers for Action Recognition: A Survey

2022-09-13 · Anwaar Ulhaq, Naveed Akhtar, Ganna Pogrebna, Ajmal Mian

Vision transformers are emerging as a powerful tool to solve computer vision problems. Recent techniques have also proven the efficacy of transformers beyond the image domain to solve numerous video-related tasks. Among …

Action RecognitionDimensionality ReductionSurveyTemporal Action Localization+1

Towards Exemplar-Free Continual Learning in Vision Transformers: an Account of Attention, Functional and Weight Regularization

2022-03-24 · Francesco Pelosin, Saurav Jha, Andrea Torsello, Bogdan Raducanu 외

In this paper, we investigate the continual learning of Vision Transformers (ViT) for the challenging exemplar-free scenario, with special focus on how to efficiently distill the knowledge of its crucial self-attention m…

Continual LearningExemplar-Free