Table of Contents
Fetching ...

Learning logic programs by discovering higher-order abstractions

Céline Hocquette, Sebastijan Dumančić, Andrew Cropper

TL;DR

This work tackles the problem of learning logic programs by automatically discovering higher-order abstractions. It introduces Stevie, a two-stage system that abstractly discovers higher-order constructs and then compresses the resulting program via a constraint optimisation problem to preserve semantics on head predicates. Empirical results across program synthesis and cross-domain domains show that refactoring with Stevie can significantly boost predictive accuracy (about +27%) and reduce learning time (about -47%), with abstractions that transfer to new domains. These findings highlight the practical value of automatic abstraction discovery for improving ILP learning and enabling cross-domain knowledge reuse, while also outlining limitations in scalability and objective design that guide future improvements.

Abstract

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.

Learning logic programs by discovering higher-order abstractions

TL;DR

This work tackles the problem of learning logic programs by automatically discovering higher-order abstractions. It introduces Stevie, a two-stage system that abstractly discovers higher-order constructs and then compresses the resulting program via a constraint optimisation problem to preserve semantics on head predicates. Empirical results across program synthesis and cross-domain domains show that refactoring with Stevie can significantly boost predictive accuracy (about +27%) and reduce learning time (about -47%), with abstractions that transfer to new domains. These findings highlight the practical value of automatic abstraction discovery for improving ILP learning and enabling cross-domain knowledge reuse, while also outlining limitations in scalability and objective design that guide future improvements.

Abstract

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.
Paper Structure (48 sections, 5 theorems, 10 equations, 13 figures, 5 tables, 1 algorithm)

This paper contains 48 sections, 5 theorems, 10 equations, 13 figures, 5 tables, 1 algorithm.

Key Result

Theorem 1

Stevie solves the optimal refactoring problem with respect to our objective function.

Figures (13)

  • Figure 1: Results for the program synthesis domain.
  • Figure 2: Example of Stevie discovering the higher-order abstraction ho$\_$filter to compress programs.
  • Figure 3: Example of Stevie discovering the higher-order abstraction ho$\_$fold to compress programs.
  • Figure 4: sumunicodes program which returns the sum of the unicodes of a list of characters.
  • Figure 5: line2 program which draws a diagonal line in an image. The predicate inv_0 is invented by Hopper.
  • ...and 8 more figures

Theorems & Definitions (20)

  • Definition 1: Abstraction
  • Example 1: Abstraction
  • Definition 2: Instantiation
  • Example 2: Instantiation
  • Definition 3: Restricted least Herbrand model
  • Definition 4: Higher-order refactoring problem
  • Example 3: Refactoring
  • Definition 5: Optimal refactoring
  • Theorem 1
  • Lemma 1
  • ...and 10 more