Abstract
Many databases store data in relational format, with different types of entities and information about links between the entities. The field of statistical-relational learning (SRL) has developed a number of new statistical models for such data. In this paper we focus on learning class-level or first-order dependencies, which model the general database statistics over attributes of linked objects and links (e.g., the percentage of A grades given in computer science classes). Class-level statistical relationships are important in themselves, and they support applications like policy making, strategic planning, and query optimization. Most current SRL methods find class-level dependencies, but their main task is to support instance-level predictions about the attributes or links of specific entities. We focus only on class-level prediction, and describe algorithms for learning class-level models that are orders of magnitude faster for this task. Our algorithms learn Bayes nets with relational structure, leveraging the efficiency of single-table nonrelational Bayes net learners. An evaluation of our methods on three data sets shows that they are computationally feasible for realistic table sizes, and that the learned structures represent the statistical information in the databases well. After learning compiles the database statistics into a Bayes net, querying these statistics via Bayes net inference is faster than with SQL queries, and does not depend on the size of the database.
Introduction: The Big Picture in Relational Data
Most Statistical Relational Learning (SRL) frameworks, such as Markov Logic Networks (MLNs), attempt to solve two problems simultaneously: learning general patterns across a database and making specific predictions about individuals (e.g., "Will Jack pass this specific course?"). However, for many high-level applications—such as policy making, strategic planning, and database query optimization—the primary interest lies in "big picture" statistics rather than individual outcomes.
Current SRL methods are often computationally expensive because they must manage the complexity of instance-level data, such as cycles in relationship graphs. This paper introduces Join Bayes Nets (JBNs), a specialized model designed to learn class-level statistics efficiently. By decoupling general statistical trends from specific individual predictions, the authors achieve learning speeds two to three orders of magnitude faster than state-of-the-art SRL methods.
The Learn-and-Join Algorithm
The core methodology proposed is the Learn-and-Join algorithm. This approach "upgrades" standard, efficient single-table Bayes Net learners to handle relational data through a hierarchical process that respects the database schema.
The process follows three primary phases:
- Analyze Single Tables: Learn dependencies within individual entity tables (e.g., a student's intelligence vs. their ranking).
- Analyze Single Joins: Join relationship tables with their linked entity tables to learn dependencies that exist only when a relationship exists (e.g., grade vs. student intelligence in a 'Registration' table).
- Analyze Double Joins: Examine dependencies across chains of relationships (e.g., how a student's attributes relate to a professor's attributes through a course).
Finally, these local graphs are merged into a global directed acyclic graph (DAG). A major technical hurdle in this process is accounting for the absence of links. The authors utilize a Virtual Join (VJ) algorithm based on a "1-minus" probability principle: $P(C, \neg Link) = P(C) - P(C, Link)$. This allows the system to calculate frequencies for missing links using only the data that actually exists in the tables, avoiding the impossible task of counting every non-existent relationship.
JBNs as Compiled Statistics
Once a JBN is learned, it acts as a "compressed" version of the database's statistics. The resulting structure represents the dependencies between various attributes across the relational schema.
This decoupling offers several advantages:
- Efficiency: Querying the JBN for a frequency is often faster than running a complex SQL
JOINandCOUNTquery, and performance does not degrade as the database grows. - Modularity: The design allows the use of any state-of-the-art propositional Bayes Net learner (like GES) as a sub-routine, leveraging decades of optimization in non-relational machine learning.
Empirical Evaluation and Results
The researchers evaluated their approach on three datasets: a synthetic University database, the MovieLens movie rating database, and a complex Financial database from the PKDD 1999 Cup.
The results demonstrated massive speedups. On the Financial dataset, the JBN approach was 600 times faster than the Alchemy (MLN) benchmark. While Alchemy failed to return results on the full MovieLens and Financial datasets due to resource exhaustion, the JBN algorithm processed them in under 10 minutes. Furthermore, the probabilities estimated by the JBN were highly accurate, with average errors of less than 3% on MovieLens and 8% on the Financial data compared to ground-truth SQL queries.
Conclusion and Future Work
While JBNs cannot provide instance-level predictions for specific individuals, they offer an unprecedented combination of speed and accuracy for class-level analysis. Future work may involve integrating JBNs with instance-level models to provide both the speed of class-level learning and the specificity of individual prediction, as well as extending the model to handle relationships between entities of the same type.
Summary updated