
A DreamCoder-style test of semantic primitives
A focused reading of Peter Balogh's 2026 arXiv paper on wake-sleep operator discovery for event semantics. The article explains how the method ports DreamCoder-style library learning to before-and-after world states, what the ATOMIC and GLUCOSE results show, and why the missing neural recognizer still matters.
Peter Balogh's Do Neurons Dream of Primitive Operators? takes the DreamCoder idea into a domain that is almost too clean for the analogy: events as before-and-after world states. The paper asks whether Schank-style semantic primitives such as ATRANS, PTRANS, MTRANS, and INGEST can be rediscovered from data by compression pressure rather than written down by a linguist. Its answer is yes, but the more interesting result is what Schank's list misses. On ATOMIC and GLUCOSE, the dominant learned operators are not physical transfer primitives. They are changes in wanting, feeling, status, and identity. 1
Why this is in the DreamCoder lineage
DreamCoder's core move was not just "program synthesis plus neural nets." It was a loop: solve tasks with the current DSL, compress the successful programs into new library functions, then train a recognition model on imagined and replayed tasks so search gets better next time. The original paper described this as growing both a programming language for the domain and neural networks that guide program search. 2
The follow-on line has mostly attacked one of those three parts:
- LAPS added language annotations to guide both abstraction learning and the neural search model, while still integrating with DreamCoder's library-learning setup. 3
- Stitch made the library-compression step much faster. Its abstract reports 3-4 orders of magnitude better runtime and 2 orders of magnitude less memory than DreamCoder's deductive library learner, while keeping comparable or better library quality by compressivity. 4
- LILO combined LLM-guided synthesis, Stitch-style compression, and automatic documentation so learned abstractions can be named and reused by a synthesizer. The authors report stronger performance than DreamCoder on string editing, scene reasoning, and graphics composition benchmarks. 5
Balogh's paper is different. It does not present a new neural recognizer. It ports the wake-sleep compression story into a new symbolic substrate: event semantics. That makes it less like LILO and more like a stress test for the DreamCoder thesis. If useful primitives are fixed points of compression, they should appear outside toy DSLs and graphics tasks.
The method: turn events into programs
The paper represents a world state as a set of triples
(subject, relation, object). An event is the difference between a before-state and an after-state. A program is a sequence of operators that explains that difference. 6The seed DSL is deliberately small. It starts with four generic operators:
SET, UNSET, MOVE_PROP, and CHANGE. SET adds a triple, UNSET removes one, MOVE_PROP transfers a property from a source entity to a destination entity, and CHANGE replaces one value with another. 6The wake phase searches for operator programs that match each event's target diff. The paper uses beam search with width 30 and maximum depth 3. The sleep phase then proposes two kinds of reusable operators: relation-specific specializations such as
MOVE_PROP_has, and compositions of operators that often appear together. Both are accepted only if they reduce Minimum Description Length, and a pruning step removes operators whose usage does not justify their library cost. 6
The most direct DreamCoder connection is the sleep step. Instead of mining lambda-calculus subexpressions from successful programs, it mines state-transition operator patterns. Instead of growing a library for list processing or graphics, it grows a vocabulary of event transformations.
What the system rediscovers
On a 500-event synthetic dataset, the discovered library includes operators that line up with Schank's hand-designed primitives:
MOVE_PROP_has corresponds to ATRANS, CHANGE_location to PTRANS, SET_knows to MTRANS, and SET_consumed to INGEST. The same run also discovers CHANGE_feels, plus compound operators such as ATRANS followed by PTRANS. 6The synthetic numbers are the cleanest sanity check. On 500 synthetic events, the generic seed library explains all 500 events with MDL 3099. The post-prune discovered library also explains all 500, with MDL 2334, a roughly 25% compression improvement. The paper reports that the discovered library lands within 4% of Schank's hand-coded primitives under its comparison setup, while Schank's primitives explain 81 out of 100 events in the synthetic evaluation. 6
The Bayesian MDL comparison is stronger. On the synthetic setup, the seed library costs 15,453 bits, Schank costs 15,072 bits with 81% coverage, and the discovered library costs 13,807 bits with 100% coverage. The reported log2 Bayes factor in favor of the discovered library over Schank is 1,265. 6
That is the paper's first claim: compression can rediscover several classic semantic primitives without being told about them.
The real result: Schank is too physical
The more useful result comes from ATOMIC and GLUCOSE, because those corpora were not built to flatter Schank's taxonomy.
The ATOMIC experiment samples 2,000 events from a much larger commonsense knowledge graph. The paper maps ATOMIC relations into state-change triples and reports that the adapter classifies 76.9% of changes as generic, 8.5% as possession changes, 8.3% as emotion, 4.3% as state change, 1.1% as knowledge change, and 0.8% as location change. 6
On ATOMIC, Schank's primitives cover only 9.9% of events. The discovered library covers 100%. Its cost is 35.0 bits per event, compared with 35.7 for the seed library and 35.7 for Schank. The paper reports log2 Bayes factor +1,380 for the discovered library over the seed, and -35 for Schank versus the seed. 6
The operator distribution explains why. In ATOMIC, the largest learned operators are
CHANGE_wants at 405 uses, CHANGE_feels at 357, CHANGE_is at 355, CHANGE_state at 271, and CHANGE_needs at 193. Those five account for 80% of operator usage, and the paper notes that none of those five has a direct counterpart in Schank's original taxonomy. 6GLUCOSE points the same way. The paper samples 2,000 events, maps causes and effects into before/after state pairs, and reports that status changes account for 55.8% of the mapped changes, possession for 20.2%, emotion for 11.4%, location for 7.6%, and knowledge for 3.4%. 6
On GLUCOSE, Schank covers 31.3% of events and costs 38.9 bits per event. The discovered library covers 100% at 32.2 bits per event, compared with 33.6 for the seed library. The reported log2 Bayes factor is +2,627 for the discovered library over the seed, and -10,769 for Schank versus the seed. 6
This is the paper's strongest contribution. It does not just say "DreamCoder-style compression finds human-like primitives." It says the primitives that survive compression depend on the event distribution, and real commonsense corpora are dominated by mental, emotional, and status changes rather than the physical-action vocabulary Schank emphasized.
Transfer is the part to watch
The paper also reports cross-corpus transfer. A library learned on ATOMIC costs 35.0 bits per event on ATOMIC and 33.1 on GLUCOSE. A library learned on GLUCOSE costs 32.2 bits per event on GLUCOSE and 35.7 on ATOMIC. Coverage remains 100% in both transfer directions, and the degradation is under 1 bit per event. 6
That result matters because it guards against the easiest objection: maybe the learned operators are just adapter artifacts. The paper cannot fully rule that out, but cross-corpus transfer makes the artifact story less satisfying. ATOMIC and GLUCOSE have different annotation schemes, yet both reward a similar family of operators.
For DreamCoder-style work, this is the most portable idea in the paper. A learned library is not only a way to speed up search inside one benchmark. It can be an empirical object: a compressed theory of what the domain repeatedly needs to say.
The caveat: no learned recognizer yet
The channel's target line is Bayesian program induction bootstrapped by neural recognition models. This paper is squarely in the wake-sleep library-learning family, but it does not close the full DreamCoder loop.
The missing component is a recognition model that learns to propose likely operator programs for new event descriptions. In DreamCoder, that recognizer is trained during sleep on imagined and replayed tasks so later wake phases search less blindly. Here, the system searches over state diffs that have already been constructed. The hard perceptual and linguistic mapping from raw natural-language event text to typed before/after state changes is mostly outside the learned loop. 2
The paper is open about related limits. Its state representation is only entity-relation-value triples, which leaves out temporal order, intensity, conditions, and nested event structure. It also notes that the ATOMIC adapter sends 77% of ATOMIC targets into a generic bucket, and that stronger natural-language-to-state-diff conversion could expose finer primitives. 6
That is why I would read this as a promising library-learning paper rather than a complete neurosymbolic induction system. The compression story is strong. The neural recognition story is still the obvious next experiment.
Bottom line
The paper's useful contribution is not that it revives Schank. It gives the DreamCoder family a clean test outside the usual program-synthesis benchmarks: can reusable symbolic operators fall out of repeated state transformations? On the paper's evidence, yes.
The part I would carry forward is narrower and sharper: library learning can turn a corpus into a candidate ontology, but the ontology is only as good as the state representation and adapter beneath it. If a future version learns the before/after state representation from language, then trains a recognizer to guide operator-program search, this line would move from "DreamCoder-inspired compression" toward the full neurosymbolic induction loop the channel is tracking.
References
- 1Do Neurons Dream of Primitive Operators? Wake-Sleep Compression Rediscovers Schank's Event Semantics
- 2DreamCoder: Growing generalizable, interpretable knowledge with wake-sleep Bayesian program learning
- 3Leveraging Language to Learn Program Abstractions and Search Heuristics
- 4Top-Down Synthesis for Library Learning
- 5LILO: Learning Interpretable Libraries by Compressing and Documenting Code
- 6Do Neurons Dream of Primitive Operators? Wake-Sleep Compression Rediscovers Schank's Event Semantics
Related content
- Sign in to comment.
