paper-with-me

홈 › Papers

A Transformer with Stack Attention

2024-05-07 · Jiaoda Li, Jennifer C. White, Mrinmaya Sachan, Ryan Cotterell

Natural languages are believed to be (mildly) context-sensitive. Despite underpinning remarkably capable large language models, transformers are unable to model many context-free language tasks. In an attempt to address this limitation in the modeling power of transformer-based language models, we propose augmenting them with a differentiable, stack-based attention mechanism. Our stack-based attention mechanism can be incorporated into any transformer-based language model and adds a level of interpretability to the model. We show that the addition of our stack-based attention mechanism enables the transformer to model some, but not all, deterministic context-free languages.

📄 PDF Abstract BibTeX arXiv:2405.04515

Code (1)

rycolab/stack-transformer 공식 구현 jax

Tasks

Language ModelingLanguage Modelling

Similar Papers 제목 키워드 기반

Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patterns

2023-10-03 · Brian DuSell, David Chiang

Attention, specifically scaled dot-product attention, has proven effective for natural language, but it does not have a mechanism for handling hierarchical patterns of arbitrary nesting depth, which limits its ability to…

Language ModelingLanguage ModellingMachine Translation

Multi-Channel Multi-Step Spectrum Prediction Using Transformer and Stacked Bi-LSTM

2024-05-29 · Guangliang Pan, Jie Li, Minglei Li

Spectrum prediction is considered as a key technology to assist spectrum decision. Despite the great efforts that have been put on the construction of spectrum prediction, achieving accurate spectrum prediction emphasize…

DecoderPrediction

StackTrans: From Large Language Model to Large Pushdown Automata Model

2025-07-21 · Kechi Zhang, Ge Li, Jia Li, Huangzhao Zhang 외 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 cap…

LayerNorm Induces Recency Bias in Transformer Decoders

2025-09-25 · Junu Kim, Xiao Liu, Zhenghao Lin, Lei Ji 외 arxiv

Causal self-attention provides positional information to Transformer decoders. Prior work has shown that stacks of causal self-attention layers alone induce a positional bias in attention scores toward earlier tokens. Ho…

Preisach Attention: A Hysteretic Model of Sequential Memory

2026-05-22 · Piotr Frydrych arxiv

We introduce the Preisach Attention Layer (PAL), a novel sequence modelling architecture grounded in the classical Preisach hysteresis operator from mathematical physics. PAL replaces the softmax attention mechanism with…