Pith.

Machine Learning · arXiv:2608.31067 v1 · submitted 31 Aug 2026 · 58 references

Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformers

Takuya Ito, Ruchir Puri, Murray Campbell, Parikshit Ram

The paper says

“Learning generalizable algorithmic computations remains a challenge for neural networks, as reflected in persistent failures on compositional and length generalization benchmarks.”

more of the abstract

We present a provably correct, transformer parameterization (with only 280 learnable parameters for Boolean algebra tasks) capable of learning and evaluating problems of any depth or length. We assume inputs are fully parenthesized, well-formed expressions. Our approach conceptualizes algorithmic tasks as circuit models embedded in transformers, enabling depth-1 circuit reduction in a single forward pass. To achieve depth generalization, we introduce a positional encoding that tracks each gate's depth within the circuit, enabling the model to identify evaluable subexpressions at each iteration via masked hard attention, with O(n) per-iteration complexity via linear attention. Combined with an autonomous halting criterion, the model terminates after d iterations for problems of depth d, yielding O(n · d) total complexity. We show that training on shallow problem instances (depth 1 and depth 2) effectively recovers interpretable parameters that {\em snap} into place, resulting in exact length generalization. Though we establish that our construction provably evaluates Boolean expressions – a universal symbolic computation – of arbitrary length perfectly, in other experiments we also demonstrate that our transformer variant can learn and generalize perfectly (100% accuracy) on other common length generalization benchmarks, including modular arithmetic and ListOps.

from the abstract

Pith says

Machine review · deepseek-v4-flash · 9 Sep 2026 · what was read was not recorded · not checked by a person

It can be wrong. Challenge this review or reply to it.

Holds up. A provably correct transformer construction for symbolic evaluation with perfect length generalization, backed by interesting empirical learning results. This line is wrong

3 major objections · 8 minor

How often objections from reviews like this one are right: not yet measured

Are you an author? What you can do.

Not checked: figures, code, what the 58 references say.

The paper says, at Section 4, Tables 1 and 3

The review did not quote this passage.

Pith says: Objection 1 of 3 · major

The paper reports "Avg Accuracy 1.000" for all tasks without stating whether this average is over all ten seeds or only over the seeds that converged, and Section 4 states that only 9/10 seeds converged for Boolean and ListOps. Because the central empirical claim is exact out-of-distribution accuracy, please state the denominator explicitly, report per-seed and per-depth accuracies with standard …

more of objection 1

… deviations or exact binomial confidence intervals for the 100-problem evaluations, and condition the abstract's "100% accuracy" and the phrase "irrespective of depth" on the converged-seed subset and on the tested depth range 3-30.

The paper says, at Section 4 Training; Appendix B.2

The review did not quote this passage.

Pith says: Objection 2 of 3 · major

The main text says the model is trained with a binary cross-entropy objective, but Appendix B.2 specifies that the loss is computed at every token position against target sequences generated by the circuit-reduction procedure, so the model receives process supervision about intermediate states, not only the final expression value.

more of objection 2

Please move this token-level supervision detail into the main text, because it materially affects what is meant by "training on depth-1 and depth-2 instances" and how the perfect generalization claim should be interpreted.

The paper says, at Section 4, final paragraph; Fig. A.1C

The review did not quote this passage.

Pith says: Objection 3 of 3 · major

The paper states that learned attention parameters (WQ, WK) "often differed" from the constructed formulation due to solution degeneracy, while also claiming that training "recovers interpretable parameters that snap into place." Please either provide per-seed comparisons showing how far the learned routing matrices deviate from the constructed ones, or explicitly restrict the interpretability/recovery claim to the hand-constructed solution and describe …

more of objection 3

… the learned models only as a degenerate family that achieves perfect out-of-distribution accuracy without being verified to implement the proved algorithm.

8 minor objections

The paper says, at Section 3.1, Eq. (3)

Pith says: minor objection 1 of 8

The notation A(t)_1 = (L X(t) GPE)1 is ambiguous: please specify the dimensions of the trailing vector of ones, state the order of the gating and cumulative-sum operations, and clarify whether the cumulative sum includes the current token.

The paper says, at Lemma 1 and Section 3.1

Pith says: minor objection 2 of 8

After one or more reduction steps the sequence contains zero-vector positions, and the reduction mask in Eq. (5) can include these positions; the lemma's phrase "tokens belonging to the deepest parenthesized spans" should be stated as "positions" so that the mask's behavior on zero vectors is explicit.

show 6 more

The paper says, at Theorem 2 statement

Pith says: minor objection 3 of 8

There is a typo in the conclusion: "delta(X(d(x)) = 0" should read "delta(X(d(x))) = 0," with a closing parenthesis.

The paper says, at Section 4 Results

Pith says: minor objection 4 of 8

The sentence claiming 100% accuracy "irrespective of the problem depth or the number of tokens" should be qualified with "up to depth 30 and up to about 41,389 tokens," because the evaluations were limited by memory at depth 30.

The paper says, at Abstract and Introduction

Pith says: minor objection 5 of 8

The phrase "universal symbolic computation" is broader than the actual result; I suggest wording such as "universal for Boolean formulas over the connectives ∧, ∨, and ∼" so that readers do not infer coverage of arbitrary operator sets or non-commutative surface grammars.

The paper says, at Section 4.1, Table 2

Pith says: minor objection 6 of 8

For arithmetic and ListOps only one fitted seed per positional encoding is used in the reported accuracies, so the table should state the number of seeds contributing to each cell; otherwise entries such as d=2 accuracy 0.73 with a single seed are easy to over-interpret.

The paper says, at Appendix B.1

Pith says: minor objection 7 of 8

Please fix small presentation issues: "in-fix" should be "infix," "predfined" in Related Work should be "predefined," and the Shieber reference entry is incomplete (missing year and venue).

The paper says, at Section 3, assumption 2

Pith says: minor objection 8 of 8

The second formal assumption is stated as token order-invariance, but the proof really requires commutativity of the local operator set together with a fixed surface grammar (infix for Boolean/arithmetic, prefix for ListOps); stating this more precisely would make the scope of Theorems 1-2 unambiguous.

What would settle it

Request or recompute the per-seed, per-depth accuracy tables (depths 3-30) for all three tasks, including non-converged seeds in a sensitivity analysis to determine what the reported 1.000 averages actually cover. Additionally, compare the learned attention and MLP parameters of the converged Boolean seed against the constructed WQ/WK and lookup table: if the learned models reliably produce the same reduction behavior as the construction on a battery of depth-100 expressions while using different attention patterns, the empirical claim should be phrased as 'behaviorally equivalent on tested depths' rather than 'recovers the construction.'

from the skeptic's reading

How the review went

4 readings by deepseek-v4-flash · 9 Sep 2026

  1. Reader holds up confidence high
  2. Skeptic agrees 32 s · 23,887 tokens read, 2,751 written
  3. Editor wrote the verdict above 17 s · 24,648 tokens read, 1,721 written
  4. Referee minor revision: 3 major objections, 8 minor 2 min 41 s · 24,324 tokens read, 14,074 written

Not run on this paper: the simulated authors' defence.

Pith did not check this review's objections against the paper.

The review in full

The review in brief, machine-written

Hi [Colleague],

You should know about this paper: it gives a hand-crafted transformer that provably evaluates Boolean expressions of any depth by iteratively reducing innermost subexpressions. The construction is clean—parenthesis-counting positional encoding, type-constrained linear attention, gated residual—and the proof holds. The authors then show that when you randomly initialize the same architecture and train only on depth-1 and depth-2 expressions, it learns to generalize perfectly to depth 30 (and beyond, in principle). That is a real result.

What’s new: a concrete, verified transformer that provably generalizes to arbitrary depth on Boolean algebra, and that this parameterization is learnable from shallow data. The paper ships code, states assumptions clearly, and compares against standard looped transformers that fail.

What it does well: the construction is spelled out lemma-by-lemma; the empirical learning is carefully done with multiple seeds, curriculum, and straight-through estimators; and the limitations are honestly listed.

Where the soft spots are: the largest one is flagged in the paper itself—the model only works on fully parenthesized inputs. The positional encoding literally counts parentheses, so it’s not learning to induce structure. That makes the “universal symbolic computation” claim scoped to bracketed Dyck-language encodings. That’s fine, but it’s a real limit.

Second: the learned models are not shown to implement the hand-crafted algorithm internally. The appendix notes that attention parameters often differ from the construction (solution degeneracy). So the empirical claim is “this architecture, when trained, matches the correct input-output mapping on tested depths,” not “the model discovers the exact algorithm.” The learning result is still interesting—it shows the search space contains a good solution—but it’s weaker than a full mechanistic verification.

Third: the reporting of 1.000 accuracy across depths is without per-seed or per-depth standard deviations, and it’s unclear how the one or two failed seeds per task are handled in the average. Minor, but worth asking about.

Who this is for: anyone working on length generalization, mechanistic interpretability, or neurosymbolic integration. It’s a solid contribution to a specific subproblem.

Recommendation: I’d send this to peer review. The central construction is sound, the empirical work is adequate, and the honesty about limitations is refreshing. A referee should press on the learnability claim and ask for per-seed breakdowns, but the paper deserves serious engagement.

Best, [Your name]

The strongest objection

The central construction (Lemmas 1-5, Theorems 1-2) is internally coherent under the paper's explicit assumption of fully parenthesized, well-formed inputs. The parenthesis-counting mask (Eqs. 3-5) correctly identifies maximum nesting depth; the cluster decomposition (Eqs. 6-9) correctly isolates contiguous reducible spans, with an appendix patch for prefix-grammar adjacency; the type-constrained linear attention aggregates operands at the operator position; the MLP implements a finite lookup table; and the gated residual (Eq. 13) preserves out-of-mask tokens. The induction in Theorem 2 follows from Theorem 1. The load-bearing fragility is therefore not internal inconsistency but the bracketed-input assumption itself, which the paper discloses in the abstract, Section 3, and Limitations: the model counts parentheses rather than inducing structure, so 'universal symbolic computation' is scoped to explicitly bracketed Dyck-language encodings. That is a scope limitation, not a correctness flaw. The empirical soft spot: the paper reports 1.000 accuracy at depths 3-30 for all tasks but does not give per-seed or per-depth standard deviations, and it explicitly notes one Boolean and one ListOps seed failed to converge; it is unclear whether Table 1 averages over converged seeds only or all seeds. Also, the appendix states learned attention matrices often differ from the constructed ones (solution degeneracy), so the empirical models are not shown to implement the proved algorithm internally, only to match its input-output behavior on tested depths. These caveats are disclosed and do not invalidate the theorem, but they qualify how strongly the 'learns the construction' claim is established.

I agree with the reader's verdict. The strongest claim is the provable construction plus empirical perfect generalization. I examined the construction step by step and found it self-consistent under the stated assumptions. The fully-parenthesized-input assumption is the load-bearing scope restriction; the reader identified it correctly, and the paper discloses it honestly in multiple places. My added observations are minor: (1) Table 1's presentation lacks per-seed/per-depth detail and is ambiguous about failed seeds; (2) learned attention parameters differing from the construction means the paper demonstrates behavioral equivalence on tested depths rather than verified recovery of the exact algorithm; and (3) ListOps depth-2 training used sampled rather than fully enumerated data. None of these shifts the verdict; they are presentation/interpretation refinements. The constructive proof, parameter-count claims, and the steep contrast with standard baselines (Table 2, Table 5) stand as reported.

The referee's report

If the claims hold, this is a genuinely useful contribution: it gives an explicit, interpretable transformer construction with a proof of correctness for arbitrary-depth evaluation, and it shows that a tiny model trained on shallow examples can achieve perfect out-of-distribution accuracy on several tasks. The construction is not circular: the hand-crafted solution does not depend on fitting parameters to data, and the learning experiments start from random initialization. The availability of code, the compact parameter counts, the explicit halting criterion, and the falsifiable empirical predictions (including the comparison baselines) are concrete strengths. The main caveat is scope: the construction operates on bracket-delimited Dyck encodings and relies on commutative local semantic maps, so the title's claim of 'universal' computation should be read with the fully-parenthesized-assumption qualifier. I also note a gap between the proved mechanism and the learned models, which the paper itself acknowledges; this gap needs to be handled carefully in the presentation.

Pith's reading of the paper (a machine's summary, not the authors')

This paper aims to establish that exact, guaranteed algorithmic computation is within reach of a tiny transformer. The authors hand-construct a parameterization of a single-layer universal transformer — 280 learnable parameters for Boolean algebra — that evaluates any fully parenthesized Boolean expression of arbitrary depth, and prove it correct: each iteration reduces the innermost subexpressions, lowering active depth by exactly one, until only the answer remains. They then show the same architecture, randomly initialized and trained only on depth-1 and depth-2 samples, learns this behavior and achieves 100% accuracy at every tested depth from 3 to 30 on Boolean algebra, modular arithmetic, and ListOps. The significance is that perfect depth generalization follows from a proof about circuit reduction, not from scale or luck of the draw.

What carries the argument. The load-bearing object is the reduction mask $P^{(t)}$, generated by the gating matrix $G_{\mathrm{PE}} = \mathrm{diag}(1,-1,0,\ldots,0)$ applied to the input, followed by forward and backward cumulative sums along the sequence. Because open parentheses contribute $+1$ and closed parentheses contribute $-1$, the positions attaining the global maximum of these running counts are exactly the deepest parenthesized span — the reducible subexpression. The remaining components exist to convert that mask into a correct local evaluation: cluster decomposition splits the mask into independent subexpressions, type-constrained linear attention routes operands to the operator position without softmax, the MLP serves as the finite lookup table of depth-1 trees, and the gated residual $X^{(t+1)} = M^{(t)} \odot X^{(t)} + P^{(t)} \odot Y^{(t)}$ preserves everything outside the mask. The identity that converts depth-1 correctness into arbitrary-depth correctness is the iteration invariant $X^{(t+1)} \equiv X^{(t)}$ with $\delta(X^{(t+1)}) = \delta(X^{(t)}) - 1$.

Core claim. The paper's central claim is that one transformer iteration can implement one circuit-reduction step, and that iterating this step evaluates any well-formed parenthesized expression in exactly as many passes as its depth. A gated positional encoding turns '(' into +1 and ')' into −1, and forward and backward cumulative sums of these contributions produce a mask over the deepest reducible subexpressions; type-constrained linear attention then aggregates each masked subexpression's tokens into a bag-of-words vector at the operator position; an MLP realizes the finite depth-1 truth table (exactly eight cases for Boolean logic); and a gated residual carries each computed value forward while leaving unreduced tokens untouched. Theorem 1 states that one pass preserves semantic equivalence while lowering active depth by one; Theorem 2 states that after $d(x)$ passes the sequence is exactly the correct answer. The authors also claim learnability: from random initialization, using straight-through estimators to keep states discrete, training on depth-1 and depth-2 expressions alone recovers the prescribed PE gating, and every converged model scores 100% at depths 3–30, halting autonomously once no parentheses remain.

The premise it rests on. The whole construction presupposes inputs are fully parenthesized, well-formed expressions, because the reduction mask is found by counting parentheses: if the structure is not explicit in brackets, there is nothing for the depth-tracking mechanism to count and the proof no longer applies.

If the paper is right (Pith's inferences, not the authors')

Any fully parenthesized expression over a finite circuit grammar becomes exactly evaluable at arbitrary depth once a correct depth-1 reduction step exists; only the vocabulary size and lookup table change between tasks.

Training on depth-1 and depth-2 instances alone is sufficient for the randomly initialized architecture to snap into the exact algorithm, reaching 100% accuracy at every depth from 3 to 30 on all three tasks.

The model halts autonomously when no parentheses remain, so run time equals expression depth: total cost is $O(n \cdot d)$, which is sub-quadratic and $O(n \log n)$ for balanced expressions.

Because the learned PE gating recovers the hand-built construction exactly, the model is fully interpretable: each iteration's parameters correspond to a named algorithmic step rather than an opaque heuristic.

Standard looped transformers with learned, RoPE, or FIRE positional encodings, and a continuous recursive-network baseline, collapse toward chance beyond training depth under the same protocol, attributing the exact generalization to the depth-tracking and masking machinery rather than the parenthesized input format alone.

A natural stress test the paper does not run: perturb a converged model's token embeddings with continuous noise and check whether accuracy stays perfect — the theorems assume exact discrete states, and the learned models realize them through finite-precision straight-through estimates, so graceful degradation is not guaranteed.

Read constructively, the architecture says bracket counting is the real prerequisite for transformer compositionality; any domain whose structure is latent (no parentheses, natural language) requires a learned structure-induction step, which the authors explicitly place beyond their theorems.

The construction transfers by design: any staged process that can be written as depth-1 local rewrites — symbolic simplification, term rewriting, delimited parsing — could inherit the same correctness theorem with only its lookup table swapped.

Because the formal lemmas target in-fix grammars directly while ListOps (a prefix grammar) needed an extra delimiter token for adjacent subexpressions, a concrete open direction is learning the reduction mask from data instead of parentheses, which would extend the result to unparenthesized or implicitly structured inputs.

Check this review

Pith stored no record of this review's passes and took no fingerprint of it. Reviews made by code from 13 Nov 2026 on carry both.

How often reviews like this one are right

Reviews like this one: written by deepseek-v4-flash, where what was read was not recorded.

How often objections from reviews like this one are right: not yet measured

Every value above, in the review's public record (JSON)

Reviews by people

This review was written by a machine. No person has reviewed this paper on Pith yet. A scientist listed on Pith can review it for a fee, and their review is published here whatever it concludes.

Request a human review

How Pith checks papers · The full audit of this paper

The paper

Abstract

Learning generalizable algorithmic computations remains a challenge for neural networks, as reflected in persistent failures on compositional and length generalization benchmarks. We present a provably correct, transformer parameterization (with only 280 learnable parameters for Boolean algebra tasks) capable of learning and evaluating problems of any depth or length. We assume inputs are fully parenthesized, well-formed expressions. Our approach conceptualizes algorithmic tasks as circuit models embedded in transformers, enabling depth-1 circuit reduction in a single forward pass. To achieve depth generalization, we introduce a positional encoding that tracks each gate's depth within the circuit, enabling the model to identify evaluable subexpressions at each iteration via masked hard attention, with O(n) per-iteration complexity via linear attention. Combined with an autonomous halting criterion, the model terminates after d iterations for problems of depth d, yielding O(n · d) total complexity. We show that training on shallow problem instances (depth 1 and depth 2) effectively recovers interpretable parameters that {\em snap} into place, resulting in exact length generalization. Though we establish that our construction provably evaluates Boolean expressions – a universal symbolic computation – of arbitrary length perfectly, in other experiments we also demonstrate that our transformer variant can learn and generalize perfectly (100% accuracy) on other common length generalization benchmarks, including modular arithmetic and ListOps.

The paper's own sentences, arranged, kept beside the review and separate from it. Each label is drawn from a closed vocabulary; the number beside it is the probability the classifier gave that label. No sentence in this record was written by a model.

abstract compiled · 2026-09-23

The authors' main claim, as the classifier picked it out 0.53

“We present a provably correct, transformer parameterization (with only 280 learnable parameters for Boolean algebra tasks) capable of learning and evaluating problems of any depth or length.”

How the main claim is stated: asserted 1.00

What the abstract itself states, as probabilities: claims first 0.08 · states limitation 0.77 · human participants 0.02 · controlled comparison 0.07 · randomized assignment 0.01 · states quantitative result 0.98 · compares with prior results 0.44 · mentions code or data availability 0.03

The abstract, sentence by sentence

This table labels the abstract only (arXiv listing abstract v1). The number is the probability the classifier gave the label.

SentenceRoleThe authors' own workStates the main conclusionStrength
Learning generalizable algorithmic computations remains a challenge for neural networks, as reflected in persistent failures on compositional and length generalization benchmarks. background 0.90 0.06 0.03 asserted 1.00
We present a provably correct, transformer parameterization (with only 280 learnable parameters for Boolean algebra tasks) capable of learning and evaluating problems of any depth or length. contribution 1.00 0.95 0.71 asserted 1.00
We assume inputs are fully parenthesized, well-formed expressions. limitation 0.59 0.27 0.02 asserted 0.96
Our approach conceptualizes algorithmic tasks as circuit models embedded in transformers, enabling depth-1 circuit reduction in a single forward pass. method 0.91 0.87 0.09 asserted 0.99
To achieve depth generalization, we introduce a positional encoding that tracks each gate's depth within the circuit, enabling the model to identify evaluable subexpressions at each iteration via masked hard attention, with $O(n)$ per-iteration complexity via linear attention. method 0.99 0.92 0.08 asserted 1.00
Combined with an autonomous halting criterion, the model terminates after $d$ iterations for problems of depth $d$, yielding $O(n \cdot d)$ total complexity. method 0.71 0.90 0.10 asserted 1.00
We show that training on shallow problem instances (depth 1 and depth 2) effectively recovers interpretable parameters that {\em snap} into place, resulting in exact length generalization. result 0.97 0.95 0.35 asserted 1.00
Though we establish that our construction provably evaluates Boolean expressions -- a universal symbolic computation -- of arbitrary length perfectly, in other experiments we also demonstrate that our transformer variant can learn and generalize perfectly (100% accuracy) on other common length generalization benchmarks, including modular arithmetic and ListOps. result 0.99 0.95 0.36 asserted 1.00

What kind of paper the classifier reports this is: method or tool 0.86 · evidence from proof or derivation 0.70

What was examined, and what was not

Sources read

  • arXiv listing abstract v1

Not examined

  • full text
  • figures and tables
  • references and citing sentences
  • relations to other papers

Levels run

  • P abstract

Not run

  • S sections
  • T body sentences
  • C citations
  • R cross-paper relations

How the labels were made

Compiled by classifier-1.13.0 via TypeSafe API, question bank abstract-p1-20260923, 2026-09-23: 1 request, 6,447 input tokens.

Every quoted sentence on this record is the authors'. Every label is from Pith's closed vocabulary, with the probability shown beside it. This record as JSON

Figures (4)
Figure 1 of the paper
Figure 1. Example A) Boolean and B) modular arithmetic expressions, encoded as circuits. Circuits provide a structured
Figure 2 of the paper
Figure 2. A visual demonstration of the PE and attention mechanism constructions (Lemmas 1-3. A) PE gating
Figure 3 of the paper
Figure 3. An illustrative example of Theorem 1 and 2. Note that each token position is a
Figure 4 of the paper
Figure 4. A) Averaged loss trajectories for arithmetic, Boolean, and ListOps tasks (including only seeds that converged).

Figures are the authors', reproduced from the paper.

References (58)
  1. [1] M. Adler, D. Alistarh, and N. Shavit. Towards Combinatorial Interpretability of Neural Computation , May 2025. URL http://arxiv.org/abs/2504.08842. arXiv:2504.08842 [cs] on PithPith's reviewarXiv
  2. [2] U. Alon and E. Yahav. On the Bottleneck of Graph Neural Networks and its Practical Implications , Mar. 2021. URL http://arxiv.org/abs/2006.05205. arXiv:2006.05205 [cs] on PithPith's reviewarXiv
  3. [3] A. Amiri, X. Huang, M. Rofin, and M. Hahn. Lower Bounds for Chain -of- Thought Reasoning in Hard - Attention Transformers , Feb. 2025. URL http://arxiv.org/abs/2502.02393. arXiv:2502.02393 [cs] on PithPith's reviewarXiv
  4. [4] S. Arora and B. Barak. Computational complexity: a modern approach. Cambridge University Press, 2009. URL https://books.google.com/books?hl=en&lr=&id=nGvI7cOuOOQC&oi=fnd&pg=PA9&dq=computational+complexity&ots=Dbc7zGdDry&sig=ZA5nA3Cq8n5hZSkjaxA-cCxvhMc on Pith
  5. [5] Y. Bengio, N. Léonard, and A. Courville. Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computation , Aug. 2013. URL http://arxiv.org/abs/1308.3432. arXiv:1308.3432 [cs] on PithPith's reviewarXiv
  6. [6] H. Cho, J. Cha, S. Bhojanapalli, and C. Yun. Arithmetic Transformers Can Length - Generalize in Both Operand Length and Count , Apr. 2025. URL http://arxiv.org/abs/2410.15787. arXiv:2410.15787 [cs] on PithPith's reviewarXiv
  7. [7] J. R. Chowdhury and C. Caragea. Modeling hierarchical structures with continuous recursive neural networks. In International Conference on Machine Learning, pages 1975--1988. PMLR, 2021 on Pith
  8. [8] J. R. Chowdhury and C. Caragea. On the design space between transformers and recursive neural nets. arXiv preprint arXiv:2409.01531, 2024 on PithPith's reviewarXiv
  9. [9] R. Csordás, K. Irie, and J. Schmidhuber. The Devil is in the Detail : Simple Tricks Improve Systematic Generalization of Transformers . In M.-F. Moens, X. Huang, L. Specia, and S. W.-t. Yih, editors, Proceedings of the 2021 Conference on Empirical Methods in Natural Language P... on Pithdoi:10.18653/v1/2021.emnlp-main.49
  10. [10] R. Csordás, K. Irie, and J. Schmidhuber. The Neural Data Router : Adaptive Control Flow in Transformers Improves Systematic Generalization , May 2022. URL http://arxiv.org/abs/2110.07732. arXiv:2110.07732 [cs] on PithPith's reviewarXiv
  11. [11] G. Deletang, A. Ruoss, J. Grau-Moya, T. Genewein, L. K. Wenliang, E. Catt, C. Cundy, M. Hutter, S. Legg, J. Veness, and P. A. Ortega. Neural Networks and the Chomsky Hierarchy . International Conference on Learning Representations, Sept. 2022. URL https://openreview.net/forum?... on Pith
  12. [12] V. P. Dwivedi and X. Bresson. A Generalization of Transformer Networks to Graphs , Jan. 2021. URL http://arxiv.org/abs/2012.09699. arXiv:2012.09699 [cs] on PithPith's reviewarXiv
  13. [13] N. Dziri, X. Lu, M. Sclar, X. L. Li, L. Jiang, B. Y. Lin, S. Welleck, P. West, C. Bhagavatula, R. Le Bras, J. Hwang, S. Sanyal, X. Ren, A. Ettinger, Z. Harchaoui, and Y. Choi. Faith and Fate : Limits of Transformers on Compositionality . Advances in Neural Information Processi... on Pith
  14. [14] N. Elhage, N. Nanda, C. Olsson, T. Henighan, N. Joseph, B. Mann, A. Askell, Y. Bai, A. Chen, and T. Conerly. A mathematical framework for transformer circuits. Transformer Circuits Thread, 1 0 (1): 0 12, 2021 on Pith
  15. [15] Y. Fan, Y. Du, K. Ramchandran, and K. Lee. Looped Transformers for Length Generalization , May 2025. URL http://arxiv.org/abs/2409.15647. arXiv:2409.15647 [cs] on PithPith's reviewarXiv
  16. [16] A. Giannou, S. Rajput, J.-y. Sohn, K. Lee, J. D. Lee, and D. Papailiopoulos. Looped Transformers as Programmable Computers , Jan. 2023. URL http://arxiv.org/abs/2301.13196. arXiv:2301.13196 [cs] on PithPith's reviewarXiv
  17. [17] O. Golovneva, T. Wang, J. Weston, and S. Sukhbaatar. Contextual Position Encoding : Learning to Count What 's Important , May 2024. URL http://arxiv.org/abs/2405.18719. arXiv:2405.18719 [cs] on PithPith's reviewarXiv
  18. [18] A. Gravina, M. Eliasof, C. Gallicchio, D. Bacciu, and C.-B. Schönlieb. On Oversquashing in Graph Neural Networks Through the Lens of Dynamical Systems , Feb. 2025. URL http://arxiv.org/abs/2405.01009. arXiv:2405.01009 [cs] on PithPith's reviewarXiv
  19. [19] T. He, D. Doshi, A. Das, and A. Gromov. Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasks. Nov. 2024. URL https://openreview.net/forum?id=aVh9KRZdRk on Pith
  20. [20] K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural networks, 2 0 (5): 0 359--366, 1989. URL https://www.sciencedirect.com/science/article/pii/0893608089900208 on PitharXiv
show 38 more
  1. [21] K. Hou, D. Brandfonbrener, S. Kakade, S. Jelassi, and E. Malach. Universal Length Generalization with Turing Programs , July 2024. URL http://arxiv.org/abs/2407.03310. arXiv:2407.03310 [cs] on PithPith's reviewarXiv
  2. [22] X. Huang, A. Yang, S. Bhattamishra, Y. Sarrof, A. Krebs, H. Zhou, P. Nakkiran, and M. Hahn. A Formal Framework for Understanding Length Generalization in Transformers , May 2025. URL http://arxiv.org/abs/2410.02140. arXiv:2410.02140 [cs] on PithPith's reviewarXiv
  3. [23] D. Hupkes, V. Dankers, M. Mul, and E. Bruni. Compositionality Decomposed : How do Neural Networks Generalise ? Journal of Artificial Intelligence Research, 67: 0 757--795, Apr. 2020. ISSN 1076-9757. doi:10.1613/jair.1.11674. URL https://www.jair.org/index.php/jair/article/view/11674 on Pithdoi:10.1613/jair.1.11674
  4. [24] T. Ito, M. Campbell, L. Horesh, T. Klinger, and P. Ram. Quantifying artificial intelligence through algorithmic generalization. Nature Machine Intelligence, 7 0 (8): 0 1195--1205, Aug. 2025. ISSN 2522-5839. doi:10.1038/s42256-025-01092-w. URL https://www.nature.com/articles/s4... on Pithdoi:10.1038/s42256-025-01092-w
  5. [25] S. Jelassi, S. d'Ascoli, C. Domingo-Enrich, Y. Wu, Y. Li, and F. Charton. Length Generalization in Arithmetic Transformers , June 2023. URL http://arxiv.org/abs/2306.15400. arXiv:2306.15400 [cs] on PithPith's reviewarXiv
  6. [26] A. Katharopoulos, A. Vyas, N. Pappas, and F. Fleuret. Transformers are RNNs : Fast Autoregressive Transformers with Linear Attention , Aug. 2020. URL http://arxiv.org/abs/2006.16236. arXiv:2006.16236 [cs] on PithPith's reviewarXiv
  7. [27] A. Kazemnejad, I. Padhi, K. Natesan Ramamurthy, P. Das, and S. Reddy. The Impact of Positional Encoding on Length Generalization in Transformers . Advances in Neural Information Processing Systems, 36: 0 24892--24928, Dec. 2023. URL https://proceedings.neurips.cc/paper_files/p... on Pith
  8. [28] N. Kim and T. Linzen. COGS : A Compositional Generalization Challenge Based on Semantic Interpretation . In B. Webber, T. Cohn, Y. He, and Y. Liu, editors, Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing ( EMNLP ) , pages 9087--9105, Onli... on Pithdoi:10.18653/v1/2020.emnlp-main.731
  9. [29] B. Lake and M. Baroni. Generalization without Systematicity : On the Compositional Skills of Sequence -to- Sequence Recurrent Networks . In International Conference on Machine Learning , pages 2873--2882. PMLR, July 2018. URL http://proceedings.mlr.press/v80/lake18a.html on Pith
  10. [30] S. Li, C. You, G. Guruganesh, J. Ainslie, S. Ontanon, M. Zaheer, S. Sanghai, Y. Yang, S. Kumar, and S. Bhojanapalli. Functional Interpolation for Relative Positions Improves Long Context Transformers , Mar. 2024. URL http://arxiv.org/abs/2310.04418. arXiv:2310.04418 [cs] on PithPith's reviewarXiv
  11. [31] A. Loukas. What graph neural networks cannot learn: depth vs width, Jan. 2020. URL http://arxiv.org/abs/1907.03199. arXiv:1907.03199 [cs] on PithPith's reviewarXiv
  12. [32] S. McLeish, A. Bansal, A. Stein, N. Jain, J. Kirchenbauer, B. R. Bartoldson, B. Kailkhura, A. Bhatele, J. Geiping, A. Schwarzschild, and T. Goldstein. Transformers Can Do Arithmetic with the Right Embeddings , May 2024. URL http://arxiv.org/abs/2405.17399. arXiv:2405.17399 [cs] on PithPith's reviewarXiv
  13. [33] W. Merrill and A. Sabharwal. The Expressive Power of Transformers with Chain of Thought . International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=NjNGlPh8Wh on Pith
  14. [34] W. Merrill and A. Sabharwal. A Little Depth Goes a Long Way : The Expressive Power of Log - Depth Transformers , Mar. 2025. URL http://arxiv.org/abs/2503.03961. arXiv:2503.03961 [cs] on PitharXiv
  15. [35] N. Nangia and S. R. Bowman. ListOps : A Diagnostic Dataset for Latent Tree Learning , Apr. 2018. URL http://arxiv.org/abs/1804.06028. arXiv:1804.06028 [cs] on PithPith's reviewarXiv
  16. [36] M. Nye, A. J. Andreassen, G. Gur-Ari, H. Michalewski, J. Austin, D. Bieber, D. Dohan, A. Lewkowycz, M. Bosma, and D. Luan. Show your work: Scratchpads for intermediate computation with language models. 2021. URL https://openreview.net/forum?id=iedYJm92o0a&ref=morioh.com&utm_so... on Pith
  17. [37] C. Olah, N. Cammarata, L. Schubert, G. Goh, M. Petrov, and S. Carter. Zoom in: An introduction to circuits. Distill, 5 0 (3): 0 e00024--001, 2020. URL https://distill.pub/2020/circuits/zoom-in/?ref=cold-takes on Pith
  18. [38] C. Olsson, N. Elhage, N. Nanda, N. Joseph, N. DasSarma, T. Henighan, B. Mann, A. Askell, Y. Bai, A. Chen, T. Conerly, D. Drain, D. Ganguli, Z. Hatfield-Dodds, D. Hernandez, S. Johnston, A. Jones, J. Kernion, L. Lovitt, K. Ndousse, D. Amodei, T. Brown, J. Clark, J. Kaplan, S. M... on PithPith's reviewarXiv
  19. [39] J. Pérez, P. Barceló, and J. Marinkovic. Attention is Turing - Complete . Journal of Machine Learning Research, 22 0 (75): 0 1--35, 2021. ISSN 1533-7928. URL http://jmlr.org/papers/v22/20-302.html on Pith
  20. [40] L. Rampášek, M. Galkin, V. P. Dwivedi, A. T. Luu, G. Wolf, and D. Beaini. Recipe for a General , Powerful , Scalable Graph Transformer , Jan. 2023. URL http://arxiv.org/abs/2205.12454. arXiv:2205.12454 [cs] on PithPith's reviewarXiv
  21. [41] J. Ray Chowdhury and C. Caragea. Efficient Beam Tree Recursion . Advances in Neural Information Processing Systems, 36: 0 29126--29148, Dec. 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/hash/5cf93940e37f7a7877cd57b6dba6b7ab-Abstract-Conference.html on Pith
  22. [42] A. Ruoss, G. Delétang, T. Genewein, J. Grau-Moya, R. Csordás, M. Bennani, S. Legg, and J. Veness. Randomized Positional Encodings Boost Length Generalization of Transformers . In A. Rogers, J. Boyd-Graber, and N. Okazaki, editors, Proceedings of the 61st Annual Meeting of the ... on Pithdoi:10.18653/v1/2023.acl-short.161
  23. [43] D. Saxton, E. Grefenstette, F. Hill, and P. Kohli. Analysing Mathematical Reasoning Abilities of Neural Models . International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=H1gR5iR5FX on Pith
  24. [44] F. Scarselli, M. Gori, A. C. Tsoi, M. Hagenbuchner, and G. Monfardini. The Graph Neural Network Model . IEEE Transactions on Neural Networks, 20 0 (1): 0 61--80, Jan. 2009. ISSN 1941-0093. doi:10.1109/TNN.2008.2005605. URL https://ieeexplore.ieee.org/abstract/document/4700287 on PitharXiv
  25. [45] D. Selsam, M. Lamm, B. Bünz, P. Liang, L. d. Moura, and D. L. Dill. Learning a SAT Solver from Single - Bit Supervision , Mar. 2019. URL http://arxiv.org/abs/1802.03685. arXiv:1802.03685 [cs] on PithPith's reviewarXiv
  26. [46] L. Sharkey, B. Chughtai, J. Batson, J. Lindsey, J. Wu, L. Bushnaq, N. Goldowsky-Dill, S. Heimersheim, A. Ortega, J. Bloom, S. Biderman, A. Garriga-Alonso, A. Conmy, N. Nanda, J. Rumbelow, M. Wattenberg, N. Schoots, J. Miller, E. J. Michaud, S. Casper, M. Tegmark, W. Saunders, ... on PithPith's reviewarXiv
  27. [47] P. Shaw, J. Cohan, J. Eisenstein, K. Lee, J. Berant, and K. Toutanova. ALTA : Compiler - Based Analysis of Transformers . Transactions on Machine Learning Research, Nov. 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=h751wl9xiR on Pith
  28. [48] R. Shen, S. Bubeck, R. Eldan, Y. T. Lee, Y. Li, and Y. Zhang. Positional Description Matters for Transformers Arithmetic . International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=ZMuPAOY8Oz on Pith
  29. [49] S. M. Shieber. Evidence against the context-freeness of natural language. In The Formal complexity of natural language, pages 320--334. Springer on Pith
  30. [50] L. Strobl, D. Angluin, D. Chiang, J. Rawski, and A. Sabharwal. Transformers as Transducers . Transactions of the Association for Computational Linguistics, 13: 0 200--219, Feb. 2024. ISSN 2307-387X. doi:10.1162/tacl_a_00736. URL https://doi.org/10.1162/tacl_a_00736 on Pithdoi:10.1162/tacl_a_00736
  31. [51] J. Su, Y. Lu, S. Pan, A. Murtadha, B. Wen, and Y. Liu. RoFormer : Enhanced Transformer with Rotary Position Embedding , Aug. 2022. URL http://arxiv.org/abs/2104.09864. arXiv:2104.09864 [cs] on PithPith's reviewarXiv
  32. [52] A. van den Oord, O. Vinyals, and k. kavukcuoglu. Neural Discrete Representation Learning . In Advances in Neural Information Processing Systems , volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper/2017/hash/7a98af17e63a0ac09ce2e96d03992fbc-Abstract.html on Pith
  33. [53] G. Weiss, Y. Goldberg, and E. Yahav. Thinking Like Transformers . In Proceedings of the 38th International Conference on Machine Learning , pages 11080--11090. PMLR, July 2021. URL https://proceedings.mlr.press/v139/weiss21a.html on Pith
  34. [54] K. Xu, W. Hu, J. Leskovec, and S. Jegelka. How Powerful are Graph Neural Networks ?, Feb. 2019. URL http://arxiv.org/abs/1810.00826. arXiv:1810.00826 [cs] on PithPith's reviewarXiv
  35. [55] A. Yang, D. Chiang, and D. Angluin. Masked Hard - Attention Transformers Recognize Exactly the Star - Free Languages , Oct. 2024. URL http://arxiv.org/abs/2310.13897. arXiv:2310.13897 [cs] on PithPith's reviewarXiv
  36. [56] C. Ying, T. Cai, S. Luo, S. Zheng, G. Ke, D. He, Y. Shen, and T.-Y. Liu. Do Transformers Really Perform Badly for Graph Representation ? In Advances in Neural Information Processing Systems , volume 34, pages 28877--28888. Curran Associates, Inc., 2021. URL https://proceedings... on Pith
  37. [57] H. Zhou, A. Bradley, E. Littwin, N. Razin, O. Saremi, J. M. Susskind, S. Bengio, and P. Nakkiran. What Algorithms can Transformers Learn ? A Study in Length Generalization . International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=AssIuHnmHX on Pith
  38. [58] D. Zhu, H. Huang, Z. Huang, Y. Zeng, Y. Mao, B. Wu, Q. Min, and X. Zhou. Hyper- Connections , Mar. 2025. URL http://arxiv.org/abs/2409.19606. arXiv:2409.19606 [cs] on PithPith's reviewarXiv
Cited by 1 Pith paper

Reviewed papers on Pith that cite this one. The full citation record

  1. Sketchpad: certified exact arithmetic with a small vision-language model cs.LG · Nov 2026
How the literature uses it

What this paper does with the arXiv papers it cites

Each citing sentence is taken from the citing paper's LaTeX source and typed by Pith's classifier. A label appears at probability 0.8 or more (0.95 for support), a contest at 0.7 or more; the quoted words are the citing authors'. How each label was checked · JSON

What it cites · 21 sentences without a confident label

Uses the method or tool of 6 papers
  • We instead give a simple and interpretable construction, repurposing existing architectural primitives used in the literature to implement a structured algorithmic process – a variant of contextual PE [ref] that delimits positions based on token occurrences, linear attention mechanisms [ref] , gated residuals as a variation on hyperconnections [ref] , and straight-through estimators throughout to simulate discrete algorithmic representations [ref] .

    Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention · Discussion and Conclusion · 0.93

  • We instead give a simple and interpretable construction, repurposing existing architectural primitives used in the literature to implement a structured algorithmic process – a variant of contextual PE [ref] that delimits positions based on token occurrences, linear attention mechanisms [ref] , gated residuals as a variation on hyperconnections [ref] , and straight-through estimators throughout to simulate discrete algorithmic representations [ref] .

    Hyper-Connections · Discussion and Conclusion · 0.93

  • We instead give a simple and interpretable construction, repurposing existing architectural primitives used in the literature to implement a structured algorithmic process – a variant of contextual PE [ref] that delimits positions based on token occurrences, linear attention mechanisms [ref] , gated residuals as a variation on hyperconnections [ref] , and straight-through estimators throughout to simulate discrete algorithmic representations [ref] .

    Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computation · Discussion and Conclusion · 0.93

Compares with 2 papers
Cites as background 12 papers
  • Prior work improves extrapolation via ad hoc architectural modifications, especially PE in transformers [ref] , scratchpads [ref] , looped/universal transformers [ref] , and program compilation approaches [ref] .

    Looped Transformers for Length Generalization · Discussion and Conclusion · 0.85

  • Prior work improves extrapolation via ad hoc architectural modifications, especially PE in transformers [ref] , scratchpads [ref] , looped/universal transformers [ref] , and program compilation approaches [ref] .

    Functional Interpolation for Relative Positions Improves Long Context Transformers · Discussion and Conclusion · 0.85

  • Prior work improves extrapolation via ad hoc architectural modifications, especially PE in transformers [ref] , scratchpads [ref] , looped/universal transformers [ref] , and program compilation approaches [ref] .

    Transformers Can Do Arithmetic with the Right Embeddings · Discussion and Conclusion · 0.85

Challenges and discussion

Disagree with the review, or know something it missed? Leave a comment, or challenge this review formally: a challenge becomes a permanent entry in this paper's record, and its decision is published here.

No comments yet.

Sign in to comment