mlsanityData to 7 Oct 2026

ReGAL: Refactoring Programs to Discover Generalizable Abstractions

arXiv 2401.16467 ↗First posted 29 Jan 2024cs.SE cs.AI cs.CLcited by 32

Not on the map. Why?

Abstract (arXiv)

While large language models (LLMs) are increasingly being used for program synthesis, they lack the global view needed to develop useful abstractions; they generally predict programs one at a time, often repeating the same functionality. Generating redundant code from scratch is both inefficient and error-prone. To address this, we propose Refactoring for Generalizable Abstraction Learning (ReGAL), a gradient-free method for learning a library of reusable functions via code refactorization, i.e., restructuring code without changing its execution output. ReGAL learns from a small set of existing programs, iteratively verifying and refining its abstractions via execution. We find that the shared function libraries discovered by ReGAL make programs easier to predict across diverse domains. On five datasets -- LOGO graphics generation, Date reasoning, TextCraft (a Minecraft-based text-game) MATH, and TabMWP -- both open-source and proprietary LLMs improve in accuracy when predicting programs with ReGAL functions. For CodeLlama-13B, ReGAL results in absolute accuracy increases of 11.5% on LOGO, 26.1% on date understanding, and 8.1% on TextCraft, outperforming GPT-3.5 in two of three domains. Our analysis reveals ReGAL's abstractions encapsulate frequently-used subroutines as well as environment dynamics.

Key facts. Cited by 32 papers in the map (data through 7 Oct 2026). Builds on 41 of its 71 references that are in the map. First posted on arXiv 29 Jan 2024.

Builds on

41 of 71 references.

References · 41

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  2. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
  3. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  5. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
  6. 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
  7. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
  8. 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
  9. 2023AgentBench: Evaluating LLMs as Agentscited by 1,211
  10. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
  11. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
  12. 2022Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agentscited by 1,029
29 more
  1. 2021Ethical and social risks of harm from Language Modelscited by 957
  2. 2023VoxPoser: Composable 3D Value Maps for Robotic Manipulation with Language Modelscited by 733
  3. 2023ViperGPT: Visual Inference via Python Execution for Reasoningcited by 591
  4. 2022Decomposed Prompting: A Modular Approach for Solving Complex Taskscited by 554
  5. 2023Identifying the Risks of LM Agents with an LM-Emulated Sandboxcited by 514
  6. 2022Visual Programming: Compositional visual reasoning without trainingcited by 507
  7. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  8. 2023Augmented Language Models: a Surveycited by 398
  9. 2015Neural Module Networkscited by 375
  10. 2023Chameleon: Plug-and-Play Compositional Reasoning with Large Language Modelscited by 352
  11. 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 347
  12. 2018TextWorld: A Learning Environment for Text-based Gamescited by 304
  13. 2023Large Language Models as Tool Makerscited by 293
  14. 2023Faithful Chain-of-Thought Reasoningcited by 285
  15. 2023ADaPT: As-Needed Decomposition and Planning with Language Modelscited by 172
  16. 2023CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsetscited by 122
  17. 2023Large Language Models as Analogical Reasonerscited by 107
  18. 2018Semantic Parsing for Task Oriented Dialog using Hierarchical Representationscited by 101
  19. 2023CREATOR: Tool Creation for Disentangling Abstract and Concrete Reasoning of Large Language Modelscited by 90
  20. 2023CLIN: A Continually Learning Language Agent for Rapid Task Adaptation and Generalizationcited by 88
  21. 2024TroVE: Inducing Verifiable and Efficient Toolboxes for Solving Programmatic Taskscited by 70
  22. 2022Top-Down Synthesis for Library Learningcited by 57
  23. 2023Visual Programming for Text-to-Image Generation and Evaluationcited by 53
  24. 2021Few-Shot Semantic Parsing with Language Models Trained On Codecited by 50
  25. 2023LILO: Learning Interpretable Libraries by Compressing and Documenting Codecited by 46
  26. 2021Leveraging Language to Learn Program Abstractions and Search Heuristicscited by 44
  27. 2023Learning adaptive planning representations with natural language guidancecited by 36
  28. 2022Summarization Programs: Interpretable Abstractive Summarization with Neural Modular Treescited by 14
  29. 2023Leveraging Code to Improve In-context Learning for Semantic Parsingcited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 11; 2025: 7; 2026: 14.

32 papers.

Sort:

By area:

  1. 2024When Can LLMs Actually Correct Their Own Mistakes? A Critical Survey of Self-Correction of LLMscited by 230
  2. 2024A Survey on Large Language Model-Based Game Agentscited by 106
  3. 2024What Are Tools Anyway? A Survey from the Language Model Perspectivecited by 53
  4. 2024Is Programming by Example solved by LLMs?cited by 27
  5. 2024Learning to Refine with Fine-Grained Natural Language Feedbackcited by 27
  6. 2025LLMs Can Generate a Better Answer by Aggregating Their Own Responsescited by 27
  7. 2024Empowering Large Language Model Agents through Action Learningcited by 20
  8. 2024The Fusion of Large Language Models and Formal Methods for Trustworthy AI Agents: A Roadmapcited by 20
  9. 2024Pix2Code: Learning to Compose Neural Visual Concepts as Programscited by 18
  10. 2025Generator-Assistant Stepwise Rollback Framework for Large Language Model Agentcited by 13
  11. 2024Enhancing Agent Learning through World Dynamics Modelingcited by 9
  12. 2025One Life to Learn: Inferring Symbolic World Models for Stochastic Environments from Unguided Explorationcited by 9
20 more
  1. 2026Evolving Programmatic Skill Networkscited by 7
  2. 2025ToolLibGen: Scalable Automatic Tool Creation and Aggregation for LLM Reasoningcited by 5
  3. 2025Refactoring Codebases through Library Designcited by 4
  4. 2026Experience Transfer for Multimodal LLM Agents in Minecraft Gamecited by 4
  5. 2024Action abstractions for amortized samplingcited by 3
  6. 2024Library Learning Doesn't: The Curious Case of the Single-Use "Library"cited by 3
  7. 2025GATE: Graph-based Adaptive Tool Evolution Across Diverse Taskscited by 3
  8. 2025A Compute-Matched Re-Evaluation of TroVE on MATHcited by 2
  9. 2026Test-Time Learning with an Evolving Librarycited by 2
  10. 2026AllocBench: Measuring Online Tool Allocation Capability in LLM Agentscited by 2
  11. 2026BIM Information Extraction Through LLM-based Adaptive Explorationcited by 1
  12. 2026ReaComp: Compiling LLM Reasoning into Symbolic Solvers for Efficient Program Synthesiscited by 1
  13. 2026CoCoDA: Co-evolving Compositional DAG for Tool-Augmented Agentscited by 0
  14. 2026PYTHALAB-MERA: Validation-Grounded Memory, Retrieval, and Acceptance Control for Frozen-LLM Coding Agentscited by 0
  15. 2026XSearch: Explainable Code Search via Concept-to-Code Alignmentcited by 0
  16. 2026PACE: Primitive-Aware Code Evolution for Automated Algorithm Designcited by 0
  17. 2026Better, Faster, Stronger: Programmatic Skill Learning Best Reduces Agent Costcited by 0
  18. 2026Credo: Reusable Declarative Primitives for Agentic Workflowscited by 0
  19. 2026Mathematics for and by human cognition: A resource-rational search for bottlenecks in problem-solvingcited by 0
  20. 2026Can Agents Design Libraries for Agents?cited by 0