Pages and contents
Pages
- Non-Generative World Model Research
- Literature Review
- Literature Notes
- Attention
- Memory
- Planning
- DreamCoder
- Genie: Generative Interactive Environments
- Genie Redux
- Loop-OWM
- Searching Latent Program Spaces
- Learning Adaptive Planning Representations with Natural Language Guidance
- Reviews
- Reinforcement Learning
- World Model Papers
- Biological
- World Models
- Representation
- Training
- Template
- Important Concepts
- Models
- Resources
DreamCoder
Field | Value | |
|---|---|---|
| ⋮⋮ | Authors | Ellis, Wong, Nye, et. al. |
| ⋮⋮ | Year | 2020 |
| ⋮⋮ | Link / arXiv | https://arxiv.org/abs/2006.08381 |
| ⋮⋮ | Code | |
| ⋮⋮ | My relevance (1-5) | 3 |
| ⋮⋮ | Tags | #meta-learning #dsl #program-learning #planning #wake-sleep |
Problem
Want to build a machine that learns like an adolescent human, a dream in machine learning that is far off. “While machines are typically designed for a single class of tasks, humans learn to solve an endless range and variety of problems, from cooking to calculus to graphic design. While machine learning is data hungry, typically generalizing weakly from experience, human learners can often generalize strongly from only modest experience.”
Approach
Authors treat learning a new task as a search for a program that solves it, which they call Wake-Sleep Bayesian Program Induction. Goal is to extrapolate rather than simply interpolate.
Previous approaches to program learning required a carefully crafted domain specific language (DSL), because without one, most programs to be discovered would be long and prohibitively improbable to be naturally discovered through algorithms that search the space. “Hence most practical applications of program induction require not only a hand-designed DSL but also a search algorithm hand-designed to exploit that DSL for fast inference. Both these requirements limit the scalability and broad applicability of program induction.”
Authors’ approach: “The system learns to learn – to write better programs, and to search for them more efficiently – by jointly growing two distinct kinds of domain expertise: (1) explicit declarative knowledge, in the form of a learned domain-specific language, capturing conceptual abstractions common across tasks in a domain; and (2) implicit procedural knowledge, in the form of a neural network that guides how to use the learned language to solve new tasks, embodied by a learned domain-specific search strategy. In Bayesian terms, the system learns both a prior on programs, and an inference algorithm (parameterized by a neural network) to efficiently approximate the posterior on programs conditioned on observed task data.”
[image: image.png]
Wake Phase
System searches for programs that solve tasks from a training set, guided by the neural recognition model, which ranks candidate programs based on the observed data for each task.
Sleep Phase
The first sleep phase “an abstraction” grows the library of programming primitives (the generative model) “by replaying experiences from waking, finding common program fragments from task solutions, and abstracting out these fragments into new code primitives.” The second sleep phase, dreaming, trains the neural network that searches for programs. Experiences from wake are replayed, and new possibilities are sampled from the wake distributions. “These random programs define tasks which the system solves during the dream phase, and the neural network is trained to predict the solutions found given the observable data for each imagined task.”
Their sleep algorithm: “A classic wake-sleep approach would sample a random program from the generative model, execute it to generate a task, and train the recognition network to predict the sampled program from the sampled task. We instead think of dreaming as creating an endless stream of random problems, which we then solve during sleep in an active process using the same program search process as in waking. We then train the recognition network to predict the solutions discovered, conditioned on the problems. Specifically, we train to perform MAP inference by maximizing where the expectation is taken over tasks.”
Math
• : training set of tasks
• : program that solves task
• : library that encodes priors
• : generative model, bayesian program given a library
• : approximate posterior predicted by the recognition model
Wake equation
Sleep phase one (abstraction)
Sleep phase two (dreaming)
Avoiding combinatorial explosion: “During each sleep cycle the next library bootstraps off the concepts learned during earlier cycles, growing an increasingly deep learned library. Simultaneously the generative and recognition models bootstrap each other: A more specialized library yields richer dreams for the recognition model to learn from, while a more accurate recognition model solves more tasks during waking which then feed into the next library. During each sleep cycle the next library bootstraps off the concepts learned during earlier cycles, growing an increasingly deep learned library. Simultaneously the generative and recognition models bootstrap each other: A more specialized library yields richer dreams for the recognition model to learn from, while a more accurate recognition model solves more tasks during waking which then feed into the next library.”
Shortcomings
The refactoring step during sleep phase one is a slow and computationally expensive bottleneck.
Descendants
Since this is a 2020 paper, we should read about its descendants
https://arxiv.org/abs/2006.08381
https://arxiv.org/abs/2106.11053
https://arxiv.org/abs/2411.08706
https://arxiv.org/abs/2411.02272
Neuro-Symbolic Concepts
Searching Latent Program Spaces