AutoMode: Relational Learning with Less Black Magic.

Jose Picado, Sudhanshu Pathak, Arash Termehchy, Alan Fern

This paper, titled "Usable & Scalable Learning Over Relational Data With Automatic Language Bias," presents a significant step toward making relational learning—a powerful but notoriously difficult subfield of machine learning—accessible to non-experts.

TL;DR

Relational learning is often considered "black magic" because it requires experts to manually tune complex "language biases" to work. This paper introduces AutoBias, a system that automatically induces these biases from database schemas and content, combined with novel sampling techniques that allow the system to scale to datasets with millions of tuples.

What Problem Does This Paper Address?

Relational databases are the backbone of modern data storage, yet most machine learning algorithms require data to be "flattened" into a single table (the IID assumption). Relational learning (or Inductive Logic Programming) avoids this by learning rules (Datalog programs) directly across multiple tables.

However, searching for these rules is computationally explosive. To make it feasible, users must provide a language bias—a set of "predicate" and "mode" definitions that tell the algorithm which tables can join and which attributes can be variables or constants. Currently, defining this bias is a tedious process of trial and error that requires deep expertise in both the database schema and the learning algorithm. The authors aim to automate this "black magic" while ensuring the process remains efficient enough for large-scale "Big Data" applications.

Methods

The authors propose a two-pronged solution:

  1. AutoBias (Automatic Bias Induction): Instead of asking a human, AutoBias extracts constraints directly from the database. It uses the Binder algorithm to discover exact and approximate Inclusion Dependencies (INDs)—essentially finding which columns in different tables share the same types of data. It then builds a "type graph" to propagate these types across the schema. To determine "modes" (whether an attribute should be a constant), it uses a simple threshold based on the cardinality of the data.
  2. Advanced Sampling for Scalability: Automated bias can sometimes be too broad, leading to massive search spaces. To handle this, the authors introduce two sampling methods for "bottom-clause" construction (the process of finding all facts related to a specific training example):
  3. Random Sampling over Semi-joins: This adapts the Olken algorithm to sample connected tuples across tables without the massive cost of materializing full joins.
  4. Stratified Sampling: This ensures that the sample includes diverse patterns (e.g., rare chemical elements in a drug database) that simple random sampling might miss, which is crucial for learning complex, accurate rules.

Datasets

The researchers evaluated their system on three distinct benchmarks:

  • UW-CSE: A small, classic dataset (1.8K tuples) about a computer science department, used to predict student-professor advisement.
  • HIV: A large dataset (7.9M tuples) containing structural information about chemical compounds, used to predict anti-HIV activity.
  • IMDb: A large dataset (8.4M tuples) of movie information, used to predict directors of drama movies.

Key Insights and Ideas

  • The Schema is the Key: The authors realized that the information experts use to write language biases is already implicitly present in the database's referential integrity constraints and data distributions.
  • Connectivity Matters: In relational data, a random sample of rows is often useless because the "links" between tables are broken. Their sampling methods prioritize head-connectedness, ensuring that every sampled fact is actually reachable from the target concept being learned.
  • Diversity vs. Randomness: On complex datasets like HIV, they found that Stratified Sampling is superior to simple random sampling. By ensuring at least one tuple is picked for every possible join path or attribute value, the learner can "see" rare but predictive features that would otherwise be lost in the noise.

Key Results

  • Accuracy: AutoBias achieved F-measures (0.64 on UW-CSE, 0.82 on HIV, 0.99 on IMDb) that were virtually identical to—and sometimes better than—biases manually written by human experts.
  • Speedup: On the massive IMDb dataset, AutoBias with random sampling completed the learning task in about 3.2 minutes. In contrast, a baseline version without proper constant handling took over 9 hours.
  • Usability: The preprocessing step to extract INDs took only a few minutes even on the largest datasets, a small price to pay for saving hours of expert manual labor.

Limitations and Future Work

While AutoBias removes the need for manual bias definitions, it introduces a new hyperparameter: the constant-threshold. While more intuitive than writing Datalog constraints, it still requires some user input.

The authors also note that while Stratified Sampling is more effective for complex data, it carries a higher computational overhead than simple random sampling. Future work could involve investigating how these automated biases could be applied to other relational frameworks, such as Markov Logic Networks (MLNs) or Probabilistic Soft Logic (PSL).

Summary updated

BibTeX
@inproceedings{picado2018automode,
  author = {Jose Picado and Sudhanshu Pathak and Arash Termehchy and Alan Fern},
  title = {{AutoMode: Relational Learning with Less Black Magic.}},
  booktitle = {ICDE},
  year = {2018},
  url = {https://openreview.net/forum?id=xXj-FTm9Yl},
}
Figure