Pith. sign in

REVIEW 2 cited by

Transformers Can Represent $n$-gram Language Models

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2404.14994 v3 pith:OBZUEMUF submitted 2024-04-23 cs.CL cs.AIcs.CCcs.FLcs.LG

classification cs.CLcs.AIcs.CCcs.FLcs.LG
keywords languagemodelstransformeremphgramrepresentarchitecturecapacity
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
abstract

Existing work has analyzed the representational capacity of the transformer architecture by means of formal models of computation. However, the focus so far has been on analyzing the architecture in terms of language \emph{acceptance}. We contend that this is an ill-suited problem in the study of \emph{language models} (LMs), which are definitionally \emph{probability distributions} over strings. In this paper, we focus on the relationship between transformer LMs and $n$-gram LMs, a simple and historically relevant class of language models. We show that transformer LMs using the hard or sparse attention mechanisms can exactly represent any $n$-gram LM, giving us a concrete lower bound on their probabilistic representational capacity. This provides a first step towards understanding the mechanisms that transformer LMs can use to represent probability distributions over strings.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Selective Induction Heads: How Transformers Select Causal Structures In Context

    cs.LG 2025-09 conditional novelty 6.0 of 10

    Transformers can learn to select the correct lag of an interleaved Markov chain in context via a circuit the authors call a selective induction head, whose asymptotic optimality proof is incomplete.

  2. Randomly Sampled Language Reasoning Problems Elucidate Limitations of In-Context Learning

    cs.LG 2025-01 conditional novelty 6.0 of 10

    On randomly sampled 3-state DFA language tasks, foundation LLMs underperform n-gram baselines under pure in-context-learning prompts.

Pith tools