Compression Enables Generalization: Wake-Sleep Cycles for Logic Programming with LLM Integration

Published on April 8, 2026 Draft

Authors:
Alexander Towell (lex@metafunctor.com)

Abstract

Knowledge bases in logic programming grow through fact accumulation but do not learn. We present DreamLog, a system that compresses its knowledge base through wake-sleep cycles, discovering rules that generalize to unseen entities. On a synthetic crafting domain with invented terms unknown to the LLM, compression enables 64% recall on unseen entities (up from 0%), with symbolic compression alone achieving 53%. A raw LLM baseline achieves 0%, confirming the compression pipeline is necessary. On a canonical family tree, the full pipeline achieves 80% recall with 100% precision.

Download PDF

Cite This Work

Show BibTeX
#compression #logic programming #wake-sleep cycles #Solomonoff induction #LLM #knowledge base #generalization