Learning Compositional Rules via Neural Program Synthesis
Maxwell I. Nye, Armando Solar-Lezama, Joshua B. Tenenbaum, Brenden M. Lake
TL;DR
The paper tackles learning compositional rules from very few examples by framing rule induction as neural program synthesis guided by symbolic checking. It combines a neural proposer that generates candidate grammars with a symbolic interpreter and a search procedure to enforce consistency with observed examples, enabling explicit rule learning and out-of-distribution generalization. Across Miniscan, SCAN challenges, and cross-language number-word decoding, the approach achieves strong or perfect performance, often outperforming neural meta-learning baselines and traditional program synthesis methods. This neuro-symbolic framework improves generalization, interpretability, and data efficiency, suggesting a viable path toward human-like, rule-based AI. The work also lays groundwork for future joint learning of meta-grammars and interpretable hybrid systems.
Abstract
Many aspects of human reasoning, including language, require learning rules from very little data. Humans can do this, often learning systematic rules from very few examples, and combining these rules to form compositional rule-based systems. Current neural architectures, on the other hand, often fail to generalize in a compositional manner, especially when evaluated in ways that vary systematically from training. In this work, we present a neuro-symbolic model which learns entire rule systems from a small set of examples. Instead of directly predicting outputs from inputs, we train our model to induce the explicit system of rules governing a set of previously seen examples, drawing upon techniques from the neural program synthesis literature. Our rule-synthesis approach outperforms neural meta-learning techniques in three domains: an artificial instruction-learning domain used to evaluate human learning, the SCAN challenge datasets, and learning rule-based translations of number words into integers for a wide range of human languages.
