Pith. sign in

REVIEW 3 cited by

Transformer-Based Models Are Not Yet Perfect At Learning to Emulate Structural Recursion

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 2401.12947 v1 pith:CA5SX7CC submitted 2024-01-23 cs.CL cs.AIcs.FLcs.LOcs.PL

classification cs.CLcs.AIcs.FLcs.LOcs.PL
keywords recursionmodelsstructuralframeworklanguageprogrammingrecursivebehavior
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

This paper investigates the ability of transformer-based models to learn structural recursion from examples. Recursion is a universal concept in both natural and formal languages. Structural recursion is central to the programming language and formal mathematics tasks where symbolic tools currently excel beyond neural models, such as inferring semantic relations between datatypes and emulating program behavior. We introduce a general framework that nicely connects the abstract concepts of structural recursion in the programming language domain to concrete sequence modeling problems and learned models' behavior. The framework includes a representation that captures the general \textit{syntax} of structural recursion, coupled with two different frameworks for understanding their \textit{semantics} -- one that is more natural from a programming languages perspective and one that helps bridge that perspective with a mechanistic understanding of the underlying transformer architecture. With our framework as a powerful conceptual tool, we identify different issues under various set-ups. The models trained to emulate recursive computations cannot fully capture the recursion yet instead fit short-cut algorithms and thus cannot solve certain edge cases that are under-represented in the training distribution. In addition, it is difficult for state-of-the-art large language models (LLMs) to mine recursive rules from in-context demonstrations. Meanwhile, these LLMs fail in interesting ways when emulating reduction (step-wise computation) of the recursive function.

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. Hierarchical Domain Generalization

    cs.LG 2026-07 conditional novelty 6.0 of 10

    Over infinite domains, hierarchy-uniform domain generalization is impossible for every nontrivial hypothesis class; a length-generalization bound is a property of the length hierarchy, not a hierarchy-free guarantee.

  2. A Tool for In-depth Analysis of Code Execution Reasoning of Large Language Models

    cs.SE 2025-01 conditional novelty 6.0 of 10

    ExeRScope uses static and dynamic program analysis to show that LLMs' code execution reasoning degrades with program complexity, nested structures, longer loops, and non-primitive types.

  3. Emergent Stack Representations in Modeling Counter Languages Using Transformers

    cs.CL 2025-02 conditional novelty 4.0 of 10

    A small transformer trained on counter languages encodes the current stack depth in its final-layer activations, recoverable by simple probing classifiers.

Pith tools