mlsanityData to 7 Oct 2026

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

arXiv 2401.12947 ↗First posted 23 Jan 2024cs.CL cs.AI cs.FLcited by 14

Not on the map. Why?

Abstract (arXiv)

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 textitsyntax of structural recursion, coupled with two different frameworks for understanding their textitsemantics -- 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.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 53 of its 91 references that are in the map. First posted on arXiv 23 Jan 2024.

Builds on

53 of 91 references.

References · 53

  1. 2017Attention Is All You Needcited by 59,932
  2. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  6. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  7. 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
  8. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  9. 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,116
  10. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  11. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  12. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
38 more
  1. 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
  2. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  3. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  4. 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 504
  5. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  6. 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
  7. 2020Generative Language Modeling for Automated Theorem Provingcited by 379
  8. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  9. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  10. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  11. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  12. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  13. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
  14. 2022Transformers Learn Shortcuts to Automatacited by 260
  15. 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 241
  16. 2023Automatically Correcting Large Language Models: Surveying the landscape of diverse self-correction strategiescited by 236
  17. 2020IntelliCode Compose: Code Generation Using Transformercited by 225
  18. 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
  19. 2023SantaCoder: don't reach for the stars!cited by 169
  20. 2023A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operationscited by 141
  21. 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
  22. 2019Learning to Prove Theorems via Interacting with Proof Assistantscited by 107
  23. 2021Self-Attention Networks Can Process Bounded Hierarchical Languagescited by 105
  24. 2022Unveiling Transformers with LEGO: a synthetic reasoning taskcited by 105
  25. 2021Statistically Meaningful Approximation: a Case Study on Approximating Turing Machines with Transformerscited by 101
  26. 2022On the Paradox of Learning to Reason from Datacited by 93
  27. 2020On the Computational Power of Transformers and its Implications in Sequence Modelingcited by 85
  28. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
  29. 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
  30. 2020How Can Self-Attention Networks Recognize Dyck-n Languages?cited by 51
  31. 2021Inductive logic programming at 30cited by 46
  32. 2019Generating Correctness Proofs with Neural Networkscited by 36
  33. 2023Code Execution with Pre-trained Language Modelscited by 33
  34. 2021Pointer Value Retrieval: A new benchmark for understanding the limits of neural network generalizationcited by 29
  35. 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
  36. 2022Passport: Improving Automated Formal Verification Using Identifierscited by 19
  37. 2021Elixir: Effective object-oriented program repaircited by 16
  38. 2021Effective Attention Sheds Light On Interpretabilitycited by 11

50 most cited of 53 All 53 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 9; 2026: 2.

14 papers.

Sort:

By area: