Pith. sign in

REVIEW 2 cited by

Can Transformers Learn $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 2410.03001 v1 pith:Q2SVGR4Y submitted 2024-10-03 cs.CL

classification cs.CL
keywords transformersgramlearntheoreticalabilityformallanguagelanguages
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
abstract

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.

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. Scaling Laws and Representation Learning in Simple Hierarchical Languages: Transformers vs. Convolutional Architectures

    cs.LG 2025-05 conditional novelty 6.0 of 10

    Convolutional networks trained on a random hierarchical grammar improve twice as fast with data as transformers, because weight sharing reuses the statistical signal across all positions.

  2. Learning curves theory for hierarchically compositional data with power-law distributed features

    stat.ML 2025-05 conditional novelty 6.0 of 10

    On hierarchical grammar data with Zipf-distributed production rules, classification error decays as P^{-a/(1+a)} while next-token prediction retains a hierarchy-only asymptotic exponent.

Pith tools