GPT is becoming a Turing machine: Here are some ways to program it
Not on the map. Why?
Abstract (arXiv)
We demonstrate that, through appropriate prompting, GPT-3 family of models can be triggered to perform iterative behaviours necessary to execute (rather than just write or recall) programs that involve loops, including several popular algorithms found in computer science curricula or software developer interviews. We trigger execution and description of Iterations by Regimenting Self-Attention (IRSA) in one (or a combination) of three ways: 1) Using strong repetitive structure in an example of an execution path of a target program for one particular input, 2) Prompting with fragments of execution paths, and 3) Explicitly forbidding (skipping) self-attention to parts of the generated text. On a dynamic program execution, IRSA leads to larger accuracy gains than replacing the model with the much more powerful GPT-4. IRSA has promising applications in education, as the prompts and responses resemble student assignments in data structures and algorithms classes. Our findings hold implications for evaluating LLMs, which typically target the in-context learning: We show that prompts that may not even cover one full task example can trigger algorithmic behaviour, allowing solving problems previously thought of as hard for LLMs, such as logical puzzles. Consequently, prompt design plays an even more critical role in LLM performance than previously recognized.
Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 38 of its 51 references that are in the map. First posted on arXiv 25 Mar 2023.
Builds on
38 of 51 references.
References · 38
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,601
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
26 more
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,397
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2022Measuring and Narrowing the Compositionality Gap in Language Modelscited by 1,054
- 2022STaR: Bootstrapping Reasoning With Reasoningcited by 895
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2022PAL: Program-aided Language Modelscited by 635
- 2022Decomposed Prompting: A Modular Approach for Solving Complex Taskscited by 554
- 2023Augmented Language Models: a Surveycited by 398
- 2022Selection-Inference: Exploiting Large Language Models for Interpretable Logical Reasoningcited by 331
- 2023The Impact of AI on Developer Productivity: Evidence from GitHub Copilotcited by 264
- 2022TALM: Tool Augmented Language Modelscited by 197
- 2023ART: Automatic multi-step reasoning and tool-use for large language modelscited by 193
- 2020Unsupervised Commonsense Question Answering with Self-Talkcited by 161
- 2019On the Turing Completeness of Modern Neural Network Architecturescited by 129
- 2022Rationale-Augmented Ensembles in Language Modelscited by 111
- 2017The Consciousness Priorcited by 105
- 2023Memory Augmented Large Language Models are Computationally Universalcited by 45
- 2021Coherence boosting: When your pretrained language model is not paying enough attentioncited by 38
- 2020Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networkscited by 35
- 2022ThinkSum: Probabilistic reasoning over sets using large language modelscited by 23
- 2022Multi-Stage Prompting for Knowledgeable Dialogue Generationcited by 22
Built on by
Citing papers per year: 2023: 6; 2024: 8; 2025: 1; 2026: 1.
16 papers.
Sort:
By area:
- 2023Reasoning with Language Model is Planning with World Modelcited by 846
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
- 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMscited by 224
- 2023Evaluating Cognitive Maps and Planning in Large Language Models with CogEvalcited by 77
- 2024AutoFlow: Automated Workflow Generation for Large Language Model Agentscited by 76
- 2023Self-Verification Improves Few-Shot Clinical Information Extractioncited by 52
- 2024Universal Length Generalization with Turing Programscited by 25
- 2024Code Simulation Challenges for Large Language Modelscited by 15
- 2024Autoregressive Large Language Models are Computationally Universalcited by 14
- 2024AIOS Compiler: LLM as Interpreter for Natural Language Programming and Flow Programming of AI Agentscited by 8
- 2025Code Simulation as a Proxy for High-order Tasks in Large Language Modelscited by 6
- 2023Rule Learning as Machine Translation using the Atomic Knowledge Bankcited by 2
4 more
- 2023Autonomous Tree-search Ability of Large Language Modelscited by 1
- 2024LaPuda: LLM-Enabled Policy-Based Query Optimizer for Multi-modal Datacited by 1
- 2024AutoGRAMS: Autonomous Graphical Agent Modeling Softwarecited by 0
- 2026PrimeScientist: Strategic Allocation of Research Effort in Autonomous Researchcited by 0
- 2026PrimeScientist: Strategic Allocation of Research Effort in Autonomous Research15 Sep 2026
- 2025Code Simulation as a Proxy for High-order Tasks in Large Language Models5 Feb 2025
- 2024Autoregressive Large Language Models are Computationally Universal4 Oct 2024
- 2024AutoGRAMS: Autonomous Graphical Agent Modeling Software14 Jul 2024
- 2024Universal Length Generalization with Turing Programs3 Jul 2024
- 2024AutoFlow: Automated Workflow Generation for Large Language Model Agents1 Jul 2024
- 2024AIOS Compiler: LLM as Interpreter for Natural Language Programming and Flow Programming of AI Agents11 May 2024
- 2024LaPuda: LLM-Enabled Policy-Based Query Optimizer for Multi-modal Data20 Mar 2024
- 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMs6 Feb 2024
- 2024Code Simulation Challenges for Large Language Models17 Jan 2024
- 2023Rule Learning as Machine Translation using the Atomic Knowledge Bank5 Nov 2023
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization25 Oct 2023
4 more
- 2023Autonomous Tree-search Ability of Large Language Models14 Oct 2023
- 2023Evaluating Cognitive Maps and Planning in Large Language Models with CogEval25 Sep 2023
- 2023Self-Verification Improves Few-Shot Clinical Information Extraction30 May 2023
- 2023Reasoning with Language Model is Planning with World Model24 May 2023
- 2024AutoFlow: Automated Workflow Generation for Large Language Model Agentscited by 76
- 2024AIOS Compiler: LLM as Interpreter for Natural Language Programming and Flow Programming of AI Agentscited by 8
- 2024AutoGRAMS: Autonomous Graphical Agent Modeling Softwarecited by 0
- 2026PrimeScientist: Strategic Allocation of Research Effort in Autonomous Researchcited by 0
- 2026PrimeScientist: Strategic Allocation of Research Effort in Autonomous Research15 Sep 2026
- 2024AutoGRAMS: Autonomous Graphical Agent Modeling Software14 Jul 2024
- 2024AutoFlow: Automated Workflow Generation for Large Language Model Agents1 Jul 2024
- 2024AIOS Compiler: LLM as Interpreter for Natural Language Programming and Flow Programming of AI Agents11 May 2024
- 2023Reasoning with Language Model is Planning with World Modelcited by 846
- 2023Reasoning with Language Model is Planning with World Model24 May 2023
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
- 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMscited by 224
- 2023Evaluating Cognitive Maps and Planning in Large Language Models with CogEvalcited by 77
- 2024Universal Length Generalization with Turing Programscited by 25
- 2024Code Simulation Challenges for Large Language Modelscited by 15
- 2024Autoregressive Large Language Models are Computationally Universalcited by 14
- 2025Code Simulation as a Proxy for High-order Tasks in Large Language Modelscited by 6
- 2023Rule Learning as Machine Translation using the Atomic Knowledge Bankcited by 2
- 2024LaPuda: LLM-Enabled Policy-Based Query Optimizer for Multi-modal Datacited by 1
- 2025Code Simulation as a Proxy for High-order Tasks in Large Language Models5 Feb 2025
- 2024Autoregressive Large Language Models are Computationally Universal4 Oct 2024
- 2024Universal Length Generalization with Turing Programs3 Jul 2024
- 2024LaPuda: LLM-Enabled Policy-Based Query Optimizer for Multi-modal Data20 Mar 2024
- 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMs6 Feb 2024
- 2024Code Simulation Challenges for Large Language Models17 Jan 2024
- 2023Rule Learning as Machine Translation using the Atomic Knowledge Bank5 Nov 2023
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization25 Oct 2023
- 2023Evaluating Cognitive Maps and Planning in Large Language Models with CogEval25 Sep 2023