Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

This dataset consists of 1,808 Inductive Logic Programming (ILP) problems based on the ChEBI25-3STAR dataset. Each problem is based on a class in ChEBI (v248) that has at least 25 molecule-annotated subclasses which are used as samples. The samples are divided into train, validation and test subsets by a global 80/10/10 split. This means that a sample always belongs to the same subset for each ILP problem.

In contrast to the ChEBI25-3STAR dataset, not all positive and negative samples are necessarily included in the ILP problems.

  • For the training split, positive samples are chosen randomly up to a maximum of 200. Negative samples are chosen by distance to the true label via breadth first search. The search iterates until the maximum of 200 samples is reached or the minimum of 25 samples is reached and all samples at the current distance level are included.
  • For the validation and test split, all positive samples and negative samples that are siblings to positive samples (i.e. that belong to a direct superclass of the true label) are included.

The code used to generate these problems can be found on GitHub.

Problem Structure

Each problem is structured as follows:

chebi_<id>/                        # one directory per ChEBI class
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ exs.pl                     # positive and negative examples
β”‚   β”‚                              #   pos(chebi_<id>(<mol_id>)).
β”‚   β”‚                              #   neg(chebi_<id>(<mol_id>)).
β”‚   β”‚
β”‚   └── atoms/           # atom-based encoding of molecules
β”‚       β”œβ”€β”€ bk.pl                  # background knowledge: all molecule facts
β”‚       β”‚                          #   has_atom(mol_id, atom_id).
β”‚       β”‚                          #   o(atom_id).  c(atom_id).  ...
β”‚       β”‚                          #   bSINGLE(a1, a2).  bDOUBLE(a1, a2).  ...
β”‚       β”‚                          #   has_1_hs(atom_id).  cip_code_R(atom_id). ...
β”‚       β”‚
β”‚       β”œβ”€β”€ bias.pl                # Popper bias file without search space constraints
β”‚       β”‚                          #   head_pred(chebi_<id>, 1).
β”‚       β”‚                          #   body_pred(<predicate>, <arity>).  ...                             
β”‚       β”‚
β”‚       β”œβ”€β”€ bias_max_vars=6_max_body=8_max_clauses=2.pl
β”‚       β”‚                          # Popper bias file with search space constraints
β”‚       β”‚                          #   max_vars(6). max_body(8). max_clauses(2).
β”‚
β”œβ”€β”€ validation/
β”‚   β”œβ”€β”€ exs.pl                     # positive and negative examples
β”‚   └── atoms/
β”‚       └── bk.pl                  # BK for validation molecules (same format)
β”‚
└── test/
β”‚   β”œβ”€β”€ exs.pl                     # positive and negative examples
    └── atoms/
        └── bk.pl                  # BK for test molecules (same format)

Usage

The problems are designed for the ILP system Popper.

Here is a basic eample for training an ILP rule with Popper:

from popper.util import Settings, format_prog
from popper.loop import learn_solution

CHEBI_ID = "26410"
PREDICATE_SET = "atoms"
BIAS = "bias_max_vars=6_max_body=8_max_clauses=2"

base = f"chebi_{CHEBI_ID}/train"

settings = Settings(
    ex_file   = f"{base}/exs.pl",
    bk_file   = f"{base}/{PREDICATE_SET}/bk.pl",
    bias_file = f"{base}/{PREDICATE_SET}/{BIAS}.pl",
    noisy     = True,           # allow imperfect rules (noise tolerance)
    anytime_solver = "nuwls",   # MaxSAT solver used during search
    timeout   = 60,             # seconds
)

prog, score, stats = learn_solution(settings)

if prog:
    print(format_prog(prog))
else:
    print("No rule found within timeout.")
Downloads last month
39