We introduce the higher-order refactoring problem, where the goal is to compress a logic program by discovering higher-order abstractions, such as map, filter, and fold. We implement our approach in Stevie, which formulates the refactoring problem as a constraint optimisation problem. Our experiments on multiple domains, including program synthesis and visual reasoning, show that refactoring can improve the learning performance of an inductive logic programming system, specifically improving predictive accuracies by 27% and reducing learning times by 47%. We also show that Stevie can discover abstractions that transfer to multiple domains.
翻译:我们引入高阶重构问题,其目标是通过发现高阶抽象(如map、filter和fold)来压缩逻辑程序。我们在Stevie系统中实现了该方法,将重构问题形式化为约束优化问题。在程序合成和视觉推理等多个领域的实验表明,重构能够提升归纳逻辑编程系统的学习性能,具体表现为预测准确率提高27%,学习时间减少47%。我们还证明Stevie能够发现可迁移至多个领域的抽象。