How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Hard and soft attention limits for formal-language prediction
Statement
For PARITY, whose members are the bit strings with an even number of s, no fixed finite-depth hard-attention sequence model with fixed parameters recognizes every sufficiently long input exactly. For 2DYCK, whose words are correctly balanced and properly nested strings over two bracket types, no such hard-attention model recognizes the language. In both cases the model appends an end marker before classification.
For all soft-attention conclusions below, fix the parameter matrices, depth, and number of heads independently of length; use scaled dot-product scores with fixed linear query/key/value maps, uniformly bounded token and positional embeddings combined by addition, globally Lipschitz positionwise maps, and a fixed globally Lipschitz logit readout followed by softmax. Under these one-symbol influence assumptions, the parity source process with fixed has sharp unigram cross-entropy level
Every such predictor has limiting lower cross-entropy at least , and the constant predictor attains it.
For the 2DYCK PCFG with rules and each of probability , and of probability , fix any . Read its left-to-right output as a finite or infinite bracket stream; sample a length- prefix conditional on at least bracket tokens having been emitted, and predict the ordinary next token, without conditioning on exact total length. Every fixed soft-attention predictor satisfying these one-symbol influence assumptions has
where is its expected next-token cross-entropy under this prefix law and is the corresponding optimal conditional cross-entropy.
The PCFG is a probability law on finite words precisely when . For all its finite output can instead be conditioned on eventual termination. For that finite-word probability law, sample prefixes conditional on reaching length and predict the next token without any additional length conditioning. The same positive-gap conclusion holds with replaced by :
For these two prefix laws agree. At finite words have infinite expected length, but the prefix bounds still hold. For the first law includes nonterminating streams and the second conditions them away; neither is an unconditioned probability distribution on finite words with the original parameter . These are cross-entropy limits, not exact-classification impossibility theorems.
Statement references
Hahn, §§5–6: hard-attention language limits and soft-attention prediction bounds
A nonfinal token has inverse-length influence under bounded soft attention: the precise bounded dot-product model and globally Lipschitz readout followed by softmax.
Paired-prefix lower bound for soft-attention 2DYCK prediction: the paired-prefix soft-attention gap.
Exact 2DYCK PCFG prefix laws and positive paired-prefix mass: exact stream and finite-word prefix laws and a uniform equal-mass pairing.
Facts & Assumptions
Given: The formal-language definitions and model conventions in the Statement.
Fixed-depth hard attention cannot recognize PARITY or 2DYCK with the stated end-marker convention (Fixed-depth hard attention cannot recognize PARITY or 2DYCK).
For the stated parity source, every such soft predictor has limiting expected cross-entropy at least , and the constant predictor attains (Fixed soft attention has no parity advantage over the unigram predictor).
Under a positive-mass disjoint equal-prefix pairing whose conditional closing targets are swapped, soft-attention next-token cross-entropy exceeds the conditional optimum by at least in the limit (Paired-prefix lower bound for soft-attention 2DYCK prediction).
The stream prefix law has disjoint equal-mass pairs of mass at least , obtained by flipping the outer opening in a final three-token opening-opening-closing pattern. Conditioning on finite output replaces the parameter by and gives the same pairing with that parameter (Exact 2DYCK PCFG prefix laws and positive paired-prefix mass).
Proof
The hard-attention assertions are exactly [F1], proved by the iterated restriction reduction for the fixed finite depth and finite alphabet, with the end marker fixed.
The parity cross-entropy lower bound and its sharpness are exactly [F2]. The probability vector is the equal mixture of the even-parity target and odd-parity target in coordinate order .
Put and append the fixed readout end marker to each sampled length- prefix. By [F4], every prefix in the paired event ends with a closing bracket and has positive stack height; the flipped opening at position is nonfinal. The pair members have equal probability and ordinary next-token laws assigning to each opening and to opposite matching closing types. Hence all hypotheses of [F3] hold with . It gives excess cross-entropy at least in the lower limit. The appended readout marker is an input convention and does not assert that the sampled source prefix terminates there.
Under conditioning on eventual termination, [F4] identifies the entire prefix and target process with parameter . Repeat step 1.3 with to prove the finite-word bound. The finite-word mass and extinction calculation in [F4] give the stated distinction between the two laws. At , let be the nodes in generation of the derivation tree. A finite-generation induction gives for every . Hence the number of nodes through generation has expectation . The total node count is at least , so monotonicity of expectation gives for every and therefore , without interchanging an expectation with an infinite sum. Finite derivations are full binary trees, and their word length is their node count minus one; thus the finite-word law has infinite expected length. Neither pairing proof uses finite expected length.
Remarks
The explicit prefix-sampling law resolves the conditioning left implicit in Hahn's Theorem 6. Its finite-mean Markov-chain sketch is unnecessary: extending any surviving prefix by two openings and the matching inner close supplies positive paired mass directly. Exact-total-length conditioning is a different prediction problem; its next-token probabilities are not generally . The fixed-length universality theorem concerns a separate regime with resources allowed to grow.
Depends on
- Hard and soft attention sequence models
- Hard-attention depth reduction under input restrictions
- Fixed-depth hard attention cannot recognize PARITY or 2DYCK
- Fixed soft attention has no parity advantage over the unigram predictor
- Paired-prefix lower bound for soft-attention 2DYCK prediction
- A nonfinal token has inverse-length influence under bounded soft attention
- Exact 2DYCK PCFG prefix laws and positive paired-prefix mass
Used by
Nothing in the library uses this result yet.
Dependency tree · two levels
11 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- Hahn, Theoretical Limitations of Self-Attention in Neural Sequence Models, §§5–6 (standard reference, not scraped)