Pith. sign in

REVIEW 3 cited by

Transformers on Markov Data: Constant Depth Suffices

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 2407.17686 v1 pith:NR3H3PGQ submitted 2024-07-25 cs.LG cs.CLcs.ITmath.ITstat.ML

classification cs.LGcs.CLcs.ITmath.ITstat.ML
keywords markovtransformersconditionaldistributionempiricalin-contextpreviousrepresent
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
abstract

Attention-based transformers have been remarkably successful at modeling generative processes across various domains and modalities. In this paper, we study the behavior of transformers on data drawn from \kth Markov processes, where the conditional distribution of the next symbol in a sequence depends on the previous $k$ symbols observed. We observe a surprising phenomenon empirically which contradicts previous findings: when trained for sufficiently long, a transformer with a fixed depth and $1$ head per layer is able to achieve low test loss on sequences drawn from \kth Markov sources, even as $k$ grows. Furthermore, this low test loss is achieved by the transformer's ability to represent and learn the in-context conditional empirical distribution. On the theoretical side, our main result is that a transformer with a single head and three layers can represent the in-context conditional empirical distribution for \kth Markov sources, concurring with our empirical observations. Along the way, we prove that \textit{attention-only} transformers with $O(\log_2(k))$ layers can represent the in-context conditional empirical distribution by composing induction heads to track the previous $k$ symbols in the sequence. These results provide more insight into our current understanding of the mechanisms by which transformers learn to capture context, by understanding their behavior on Markov sources.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

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

  1. Learning In-context n-grams with Transformers: Sub-n-grams Are Near-stationary Points

    cs.LG 2025-08 reject novelty 7.0 of 10

    Sub-n-gram estimators are near-stationary points of the population cross-entropy loss for in-context n-gram learning, offering a theoretical explanation for stage-wise training plateaus.

  2. 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.

  3. KV Shifting Attention Enhances Language Modeling

    cs.CL 2024-11 conditional novelty 6.0 of 10

    KV shifting attention, which mixes each token's key and value with its predecessor's, reduces the depth and width needed to implement induction heads and improves language modeling in tests up to 19B parameters.

Pith tools