NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Compact Representation of Knowledge Bases in Inductive Logic Programming

Jan Struyf, Jan Ramon, Maurice Bruynooghe, Sofie Verbaeten, Hendrik BlockeelMachine Learning 2004 · DOI

Abstract

Inductive Logic Programming (ILP) systems traditionally struggle with massive datasets due to redundant storage of examples. This paper introduces a meta-programming framework that eliminates redundancy by representing examples as "recipes" constructed from shared theories. By utilizing a Knowledge Base Graph (KBG) and a specialized heuristic example iterator, the system manages the trade-off between memory efficiency and computational cost. Evaluation on large-scale chemical and game-state datasets shows storage reductions of up to 75x and significant improvements in processing speed and scalability.

1. Introduction

In Inductive Logic Programming (ILP), machines learn rules from examples represented as logic programs. Traditionally, these examples are stored in one of two ways:

  1. Monolithic: A single large file containing all data, which becomes unmanageable as datasets grow.
  2. Independent Interpretations: Modular storage where each example is a "mini-theory." While modular, this leads to massive redundancy—for instance, storing the definition of a common chemical sub-structure thousands of times across different molecules.

While relational databases (RDBMS) can handle large data, they are often inefficient for the recursive, pointer-heavy queries common in logic programming. This research addresses the "memory vs. speed" trade-off by proposing a method to store knowledge bases compactly without sacrificing learning performance.

2. Methods

The proposed framework employs a two-layered approach to manage data redundancy.

2.1 The Representation Layer (Meta-Theories)

Instead of static files, examples are defined using meta-theories. A meta-theory uses "recipes" to construct an example from existing theories. For example, a molecule might be defined by taking a base structure and applying an add/1 predicate to include a specific functional group.

  • Theories: Named units of logic (clauses).
  • Meta-rules: Predicates that merge or transform theories.
  • Schemas: Templates that use for_each constructs to automatically generate large sets of similar examples.

2.2 The Algorithmic Layer (The Iterator)

To process these recipes, the system represents dependencies as a Knowledge Base Graph (KBG)—a directed hypergraph where nodes are theories and edges are construction recipes.

Evolution of knowledge base representations and the dependency graph.

Because constructing a theory incurs a CPU cost and storing it in RAM incurs a memory cost, the authors developed a Heuristic Example Iterator. This planner traverses the KBG in an order that minimizes re-construction time while keeping active data within a user-defined memory cache. The authors identify that traversing a dependent knowledge base optimally is an NP-hard planning problem; their heuristic provides a practical solution for real-world ILP tasks.

3. Experimental Evaluation

The framework was evaluated on three domains: Cancer (DTP) (chemical compounds tested against cell lines), HIV (compounds with shared sub-structures), and Go (game logs where states differ by single moves).

3.1 Key Results

  • Storage Compression: The Cancer dataset saw a 75x reduction in size, and the Go dataset saw a 55x reduction.
  • Execution Speed: In the Cancer dataset, the compact representation was 2x faster than standard settings. By reducing disk I/O, the system avoided the bottleneck of reading massive redundant files.
  • Scalability: The system successfully processed nearly 300,000 examples, a scale that typically causes traditional ILP systems to crash or suffer from excessive disk swapping.

4. Discussion and Conclusion

The core innovation of this work is treating examples as transformations (diffs) rather than static states. This is particularly effective for sequential data like game states. However, the framework has limitations; in the HIV dataset, the overhead of building molecules from sub-structures outweighed the I/O savings, indicating that the approach is best suited for datasets with extremely high structural overlap.

Future work includes integrating automated frequent pattern discovery to identify shared "building blocks" without manual intervention and exploring incremental compilation in Prolog to further reduce runtime construction costs.

Summary updated

BibTeX
@article{struyf2004compact,
  author = {Jan Struyf and Jan Ramon and Maurice Bruynooghe and Sofie Verbaeten and Hendrik Blockeel},
  title = {{Compact Representation of Knowledge Bases in Inductive Logic Programming}},
  journal = {Machine Learning},
  year = {2004},
  doi = {10.1023/b:mach.0000039780.84966.04},
}
Figure