paper-with-me

Papers

Can Transformers Learn $n$-gram Language Models?

2024-10-03 · Anej Svete, Nadav Borenstein, Mike Zhou, Isabelle Augenstein, Ryan Cotterell

Much theoretical work has described the ability of transformers to represent formal languages. However, linking theoretical results to empirical performance is not straightforward due to the complex interplay between the architecture, the learning algorithm, and training data. To test whether theoretical lower bounds imply \emph{learnability} of formal languages, we turn to recent work relating transformers to $n$-gram language models (LMs). We study transformers' ability to learn random $n$-gram LMs of two kinds: ones with arbitrary next-symbol probabilities and ones where those are defined with shared parameters. We find that classic estimation techniques for $n$-gram LMs such as add-$\lambda$ smoothing outperform transformers on the former, while transformers perform better on the latter, outperforming methods specifically designed to learn $n$-gram LMs.

📄 PDF Abstract BibTeX arXiv:2410.03001

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Discovering Interpretable Algorithms by Decompiling Transformers to RASP

2026-02-09 · Xinting Huang, Aleksandra Bakalova, Satwik Bhattamishra, William Merrill 외 arxiv

Recent work has shown that the computations of Transformers can be simulated in the RASP family of programming languages. These findings have enabled improved understanding of the expressive capacity and generalization a…

Going Beyond Linear Transformers with Recurrent Fast Weight Programmers

2021-06-11 · NeurIPS 2021 12 · Kazuki Irie, Imanol Schlag, Róbert Csordás, Jürgen Schmidhuber

Transformers with linearised attention (''linear Transformers'') have demonstrated the practical scalability and effectiveness of outer product-based Fast Weight Programmers (FWPs) from the '90s. However, the original FW…

Atari GamesListOps

Learning Transformer Programs

2023-06-01 · NeurIPS 2023 11 · Dan Friedman, Alexander Wettig, Danqi Chen

Recent research in mechanistic interpretability has attempted to reverse-engineer Transformer models by carefully inspecting network weights and activations. However, these approaches require considerable manual effort a…

In-Context LearningInterpretable Machine Learningnamed-entity-recognitionNamed Entity Recognition+2

Context-Free Recognition with Transformers

2026-01-05 · Selim Jerad, Anej Svete, Sophie Hao, Ryan Cotterell 외 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 st…

Knee-Deep in C-RASP: A Transformer Depth Hierarchy

2025-06-19 · Andy Yang, Michaël Cadilhac, David Chiang

It has been observed that transformers with greater depth (that is, more layers) have more capabilities, but can we establish formally which capabilities are gained with greater depth? We answer this question with a theo…