Human Program Induction: Theory and Practice
- Human program induction is defined as the ability to infer structured, compositional algorithms from minimal examples, emphasizing abstraction and hierarchical planning.
- It employs probabilistic frameworks, domain-specific languages, and Bayesian inference to optimize representational efficiency and promote subroutine reuse.
- The approach informs both cognitive science and machine synthesis by revealing how inductive biases and curriculum effects drive efficient, interpretable problem-solving.
Human Program Induction refers to the process by which humans infer, construct, and utilize structured, compositional algorithms (“programs”) to solve novel tasks from sparse information. Unlike black-box learning protocols, human program induction is characterized by abstraction, hierarchical structure, reuse of learned subroutines, and the explicit encoding and manipulation of symbolic representations. This capability enables rapid generalization, data-efficient learning, flexible planning, and interpretable reasoning across domains spanning concept learning, spatial navigation, problem-solving, mathematical reasoning, and language understanding.
1. Foundational Principles and Cognitive Phenomena
Human program induction is founded on key principles:
- Abstraction and compositionality: Humans discover and internalize reusable, high-level subroutines (abstractions) and flexibly compose them to generate complex behaviors or outputs (Tian et al., 2020, Kumar et al., 2022).
- Representational and algorithmic efficiency: The process privileges parsimonious representations—minimizing stored program length (representational efficiency)—even at the expense of longer action sequences (execution efficiency) (Sanborn et al., 2018, Correa et al., 2023).
- Hierarchical structure: Programs are constructed via hierarchies of subgoals or subroutines, closely mirroring principles of hierarchical reinforcement learning and human action planning (Correa et al., 2023, Sanborn et al., 2018).
- Inductive bias and prior structure: Inductive biases are shaped by linguistic descriptions, domain-specific primitives, and nonparametric Bayesian priors (e.g., Chinese Restaurant Processes over subroutine calls) (Kumar et al., 2022, Correa et al., 2023).
Human program induction accounts for an array of cognitive phenomena:
- Fast adaptation and generalization to new concepts from few examples (Tian et al., 2020, Johnson et al., 2021).
- Systematic reuse and transfer of learned subroutines across related tasks (Tian et al., 2020, Zhou et al., 2024).
- Preference for program plans that maximize reuse, even beyond pure minimum description length (Correa et al., 2023).
- Resource-rational tradeoffs between parsimony, accuracy, and computational cost (Zhou et al., 2024).
2. Formal Frameworks and Algorithmic Models
Human program induction is typically formalized within probabilistic or Bayesian frameworks over program spaces:
- Domain-specific languages (DSLs) and grammars: Programs are trees or sequences in a DSL, parameterized by primitive operations and combinators. Functional and combinatory logic grammars, probabilistic context-free grammars (PCFGs), and type-safe DSLs are widely employed (Tian et al., 2020, Fränken et al., 2023, Zhou et al., 2024).
- Bayesian program induction: The hypothesis space is endowed with priors (favoring short or highly reused programs) and likelihoods defined by the fit between output and observations. Posterior inference yields MAP programs accounting for the data (Fränken et al., 2023, Tian et al., 2020, Correa et al., 2024).
- Adaptor grammars and library learning: Nonparametric priors (e.g., Pitman–Yor or CRP) induce a bias for subroutine reuse, supporting “library learning” and the emergence of compositional libraries across tasks (Correa et al., 2023, Zhou et al., 2024).
- Co-training and multimodal representations: Inductive agents may jointly learn to predict abstract representations in both language and program code, capturing human-like compression and structuring behavior (Kumar et al., 2022).
Inference algorithms include MCMC in program space (Fränken et al., 2023, Correa et al., 2024), greedy search or iterative compression (Sanborn et al., 2018), DreamCoder-style explore–compile–compress loops (Tian et al., 2020, Kumar et al., 2022), as well as hybrid neural-symbolic objective integration.
3. Hierarchy, Reuse, and Description Length in Human Planning
Hierarchical decomposition and subroutine reuse are central features of human program induction. In Lightbot-style planning tasks and grid-based problem-solving:
- Participants construct hierarchical programs by composing primitives and up to four subroutines per task (Correa et al., 2023).
- The description length (DL)—the total number of instructions stored across the main program and subroutines—is minimized, sometimes even at the cost of increased execution length (flattened action sequence) (Sanborn et al., 2018, Correa et al., 2023).
- Empirical data show that humans systematically prefer programs with “rich-get-richer” subroutine call patterns, as modeled by CRP-inspired priors, even when MDL and step-cost predictions are matched (Correa et al., 2023).
- Planning is facilitated by highly reusable structures: frequently chosen programs are written faster and require less debugging, indicating cognitive efficiency (Correa et al., 2023).
- Cross-task compressibility and abstraction transfer are robustly observed, with higher compressibility in both linguistic and program representations correlating with more efficient search and behavior (Kumar et al., 2022, Tian et al., 2020).
4. Program Induction Beyond Symbolic Planning
Human program induction is not limited to language-like or algorithmic reasoning:
- Spatial and motor domains: In tasks such as map induction and abstract drawing, humans induce compositional “submap” or “gesture” programs using PCFG-based inference, enabling efficient exploration and generalization across environments or visual objects (Tian et al., 2020, Sharma et al., 2021).
- Map Induction: Posterior inference over PCFG-generated spatial layouts explains efficient exploratory behavior and the reuse of spatial modules (corridors, cue-rooms) (Sharma et al., 2021).
- Drawing: Abstraction and compositionality in motor program induction explain few-shot transfer in copying structured objects, with recurrent discovery of parameterized subroutines (e.g., vertical/horizontal “skewer” motifs) (Tian et al., 2020).
- Core knowledge and perception: Bayesian program induction underlies infant object perception, explaining rigidity and object persistence via simple compositional programs inferred from minimal exposure, with no need for hardcoded “core systems” (Fränken et al., 2023).
- Strategy discovery and reinforcement learning: Bayesian program induction recovers classic and novel decision heuristics (win–stay/lose–shift, asymmetric accumulators, adaptive exploration) as points on a simplicity–performance Pareto frontier (Correa et al., 2024).
5. Human Program Induction and Machine Program Synthesis
Research directly comparing human and machine capabilities reveals both strengths and limitations in human program induction:
- Programming by Example (PBE): Humans generally perform poorly at selecting sets of input–output examples sufficient to specify the target program. Expert-generated or strategically randomized examples yield higher machine generalization accuracy than non-expert human examples (Hocquette et al., 2024).
- Hybrid and interactive workflows: Structured human–LLM interaction, with explicit composition and intelligibility protocols, enables rapid synthesis of high-quality scientific “assistant” programs, outperforming ad hoc “no-code” or manual workflows in program performance, quality, and development effort (Surana et al., 18 Mar 2025).
- Search space heuristics: Human code corpora provide strong statistical priors on instruction and solution probabilities, enabling the pruning of combinatorial search spaces by orders of magnitude in inductive programming engines, while maintaining high coverage on held-out human programs (McDaid et al., 13 Jun 2025).
- Human–machine inductive bias alignment: Co-training machine RL agents to predict human-generated language/task abstractions or program library embeddings induces more human-like behavioral asymmetries, as measured by transfer and selectivity in search–reveal tasks (Kumar et al., 2022).
- Rationale generation as scaffolding: Requiring natural-language rationales constrains the latent program hypothesis space in symbolic algebra problem-solving, improving transparency and enabling interpretable, faithful model explanations (Ling et al., 2017).
- Curriculum sensitivity and resource-rationality: The evolution and generalizability of learned libraries in human-like program learners is highly sensitive to the training curriculum; methods based on partial information decomposition can optimize training order for synergistic library growth (Zhou et al., 2024).
6. Implications, Limitations, and Open Problems
Current findings converge on several key implications:
- Abstraction is the driver of human-like inductive bias: Program induction aligned with abstraction (library learning, natural language compression) yields generalization and problem selectivity matching human asymmetries (Kumar et al., 2022, Tian et al., 2020).
- Human solution structure is not fully accounted for by compression or utility models alone: Humans exhibit further biases—especially reuse and hierarchical organization—that extend beyond MDL or step-count objectives (Correa et al., 2023).
- Cognitive universality of program induction: Bayesian program induction, grounded in domain-general compositional grammars, explains learning patterns in perception, planning, drawing, and reasoning, countering strong claims of domain-specific “core knowledge” (Fränken et al., 2023, Zhou et al., 2024).
- Expertise, feedback, and pedagogy are critical for effective teaching of programs to machines: Non-experts are inefficient at constructing minimal teaching sets; interactive guidance and machine-generated counterexamples improve the quality and sufficiency of example-based specification (Hocquette et al., 2024).
- Algorithmic synergy with symbolic–neural hybrids: Integrating neural representations (language, vision) with program abstraction support promises more human-like generalization and interpretability in program synthesis (Kumar et al., 2022).
Outstanding challenges include formalizing subroutine discovery in human learning, accounting for curriculum effects on library formation and generalization (Zhou et al., 2024), extending models to unstructured real-world domains, and building robust human-in-the-loop inductive systems that scaffold both human and machine learners.
Cited Works:
- “Using Natural Language and Program Abstractions to Instill Human Inductive Biases in Machines” (Kumar et al., 2022)
- “Program-Based Strategy Induction for Reinforcement Learning” (Correa et al., 2024)
- “Learning abstract structure for drawing by efficient motor program induction” (Tian et al., 2020)
- “Representational efficiency outweighs action efficiency in human program induction” (Sanborn et al., 2018)
- “Exploring the hierarchical structure of human plans via program generation” (Correa et al., 2023)
- “Can humans teach machines to code?” (Hocquette et al., 2024)
- “Map Induction: Compositional spatial submap learning for efficient exploration in novel environments” (Sharma et al., 2021)
- “Instruction and Solution Probabilities as Heuristics for Inductive Programming” (McDaid et al., 13 Jun 2025)
- “Harmonizing Program Induction with Rate-Distortion Theory” (Zhou et al., 2024)
- “Modeling infant object perception as program induction” (Fränken et al., 2023)
- “Program Induction by Rationale Generation : Learning to Solve and Explain Algebraic Word Problems” (Ling et al., 2017)
- “Engineering Scientific Assistants using Interactive Structured Induction of Programs” (Surana et al., 18 Mar 2025)
- “Fast and flexible: Human program induction in abstract reasoning tasks” (Johnson et al., 2021)