StackTrans: From Large Language Model to Large Pushdown Automata Model
Not on the map. Why?
Abstract (arXiv)
The Transformer architecture has emerged as a landmark advancement within the broad field of artificial intelligence, effectively catalyzing the advent of large language models (LLMs). However, despite its remarkable capabilities and the substantial progress it has facilitated, the Transformer architecture still has some limitations. One such intrinsic limitation is its inability to effectively capture the Chomsky hierarchy, such as regular expressions or deterministic context-free grammars. Drawing inspiration from pushdown automata, which efficiently resolve deterministic context-free grammars using stacks, we propose StackTrans to address the aforementioned issue within LLMs. Unlike previous approaches that modify the attention computation, StackTrans explicitly incorporates hidden state stacks between Transformer layers. This design maintains compatibility with existing frameworks like flash-attention. Specifically, our design features stack operations -- such as pushing and popping hidden states -- that are differentiable and can be learned in an end-to-end manner. Our comprehensive evaluation spans benchmarks for both Chomsky hierarchies and large-scale natural languages. Across these diverse tasks, StackTrans consistently outperforms standard Transformer models and other baselines. We have successfully scaled StackTrans up from 360M to 7B parameters. In particular, our from-scratch pretrained model StackTrans-360M outperforms several larger open-source LLMs with 2-3x more parameters, showcasing its superior efficiency and reasoning capability.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 29 of its 46 references that are in the map. First posted on arXiv 21 Jul 2025.
Builds on
29 of 46 references.
References · 29
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023Qwen Technical Reportcited by 3,344
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
17 more
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2018Relational inductive biases, deep learning, and graph networkscited by 1,360
- 2024DeepSeek LLM: Scaling Open-Source Language Models with Longtermismcited by 642
- 2024OLMo: Accelerating the Science of Language Modelscited by 613
- 2024Dolma: an Open Corpus of Three Trillion Tokens for Language Model Pretraining Researchcited by 483
- 2025SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Modelcited by 335
- 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
- 2022Neural Networks and the Chomsky Hierarchycited by 217
- 2024Hyper-Connectionscited by 84
- 2015Inferring Algorithmic Patterns with Stack-Augmented Recurrent Netscited by 76
- 2015Learning to Transduce with Unbounded Memorycited by 54
- 2022Transformer Grammars: Augmenting Transformer Language Models with Syntactic Inductive Biases at Scalecited by 41
- 2023Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patternscited by 17
- 2024A Transformer with Stack Attentioncited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Pimba: A Processing-in-Memory Acceleration for Post-Transformer Large Language Model Serving
- 2025Emergent Stack Representations in Modeling Counter Languages Using Transformers
- 2025Is Random Attention Sufficient for Sequence Modeling? Disentangling Trainable Components in the Transformer
- 2025Speed Always Wins: A Survey on Efficient Architectures for Large Language Models
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptation
- 2025Finite State Automata Inside Transformers with Chain-of-Thought: A Mechanistic Study on State Tracking
- 2024Let's Think Dot by Dot: Hidden Computation in Transformer Language Models
- 2025Equivalence of Context and Parameter Updates in Modern Transformer Blocks