paper-with-me

Papers

StackTrans: From Large Language Model to Large Pushdown Automata Model

2025-07-21 · Kechi Zhang, Ge Li, Jia Li, Huangzhao Zhang, Yihong Dong, Jia Li, Jingjing Xu, Zhi Jin 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.

📄 PDF Abstract BibTeX arXiv:2507.15343

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Prediction of Infinite Words with Automata

2016-03-08 · Tim Smith

In the classic problem of sequence prediction, a predictor receives a sequence of values from an emitter and tries to guess the next value before it appears. The predictor masters the emitter if there is a point after wh…

Prediction

Algorithms for Weighted Pushdown Automata

2022-10-13 · Alexandra Butoi, Brian DuSell, Tim Vieira, Ryan Cotterell 외

Weighted pushdown automata (WPDAs) are at the core of many natural language processing tasks, like syntax-based statistical machine translation and transition-based dependency parsing. As most existing dynamic programmin…

Dependency ParsingMachine TranslationTransition-Based Dependency Parsing

On the Computational Power of RNNs

2019-06-14 · Samuel A. Korsky, Robert C. Berwick

Recent neural network architectures such as the basic recurrent neural network (RNN) and Gated Recurrent Unit (GRU) have gained prominence as end-to-end learning architectures for natural language processing tasks. But w…

Pushdown Automata in Statistical Machine Translation

2014-09-01 · CL 2014 9 · Cyril Allauzen, Bill Byrne, Adri{\`a} de Gispert, Gonzalo Iglesias 외
Language ModellingMachine TranslationTranslation

Pre$^3$: Enabling Deterministic Pushdown Automata for Faster Structured LLM Generation

2025-06-04 · Junyi Chen, Shihao Bai, Zaijun Wang, Siyu Wu 외

Extensive LLM applications demand efficient structured generations, particularly for LR(1) grammars, to produce outputs in specified formats (e.g., JSON). Existing methods primarily parse LR(1) grammars into a pushdown a…