Finding Patterns in a Knowledge Base using Keywords to Compose Table Answers

Mohan Yang, Bolin Ding, Surajit Chaudhuri, Kaushik Chakrabarti

Abstract

Keyword search over Knowledge Bases (KBs) typically yields a fragmented list of individual subtrees, making it difficult for users to grasp aggregate information. This paper proposes a method to automatically group these results into structured tables by identifying shared tree patterns. By leveraging path-based indexing and efficient enumeration algorithms, the system can interpret keyword queries as structural templates, enabling the composition of coherent table answers from heterogeneous graph data.

The Challenge of Keyword Search in Knowledge Bases

Knowledge Bases like DBPedia or Freebase contain vast amounts of structured data, yet querying them often requires specialized languages like SPARQL. Keyword search offers a more accessible alternative but frequently fails to provide a holistic view. Instead of a structured list, users often receive a ranked list of individual subtrees.

For instance, a query for "database software company revenue" might return several distinct entities. Some results might link a company directly to its revenue, while others might involve intermediate nodes like subsidiaries or specific product versions. Manually aggregating these heterogeneous results into a table is labor-intensive. This research addresses the problem of table composition: the automatic identification of structural patterns within a graph that match a query to aggregate results into a tabular format.

A Knowledge Graph snippet showing how entities like SQL Server and Oracle DB share common structural relationships.

Methodology: Tree Patterns and Indexing

The core of the proposed approach is the concept of a Tree Pattern. A tree pattern acts as a structural template, defining how keywords map to specific arrangements of node types and edge types. Each row in the final table corresponds to a subtree in the Knowledge Graph that fits this template.

Examples of tree patterns that serve as templates for aggregating graph data into tables.

To ensure query efficiency, the authors implement Path-Based Indexing. Rather than scanning the entire graph at runtime, the system precomputes paths of a fixed height d that connect root nodes to keywords. Two indexing strategies are explored:

  • Pattern-first indexing: Groups paths by their structural pattern, facilitating rapid pattern discovery.
  • Root-first indexing: Groups paths by their starting node, which is useful for identifying candidate roots.

Algorithms and Complexity

The paper introduces two primary algorithms for generating these tables:

  1. PETopK (Pattern Enumeration-Join): This algorithm joins path patterns from the index to find valid tree patterns. It is highly efficient for small queries as it avoids expensive online aggregation.
  2. LETopK (Linear-Time Enumeration): Designed for robustness with large result sets, this algorithm identifies candidate root nodes first and then assembles the corresponding trees.

To further optimize performance, a sampling technique is applied to LETopK. By evaluating only a fraction (e.g., 10%) of potential roots, the system can accurately estimate pattern relevance scores, achieving a 10x speedup with minimal impact on precision. Notably, the authors prove that counting the number of tree patterns for a given query is #P-Complete, justifying the focus on efficient top-k ranking rather than exhaustive enumeration.

Evaluation and Results

The system was evaluated using two large-scale datasets: Wiki (1.89M entities, 34.99M edges) and IMDB (6.58M entities, 79.42M edges).

Key findings include:

  • Efficiency and Scalability: Both PETopK and LETopK outperformed baseline enumeration-aggregation methods. The algorithms scale linearly with the size of the graph and the number of subtrees.
  • Interpretation through Structure: The system successfully identified different "interpretations" of queries. For example, "Microsoft software" could be interpreted as "Software developed by Microsoft" or "Software compatible with Windows," with each interpretation presented as a separate table.
  • Precision: The sampling-based optimization maintained over 95% precision in top-k rankings while significantly reducing computational overhead.

Conclusion

This research demonstrates that identifying shared tree patterns is a powerful way to turn messy keyword search results into structured, interpretable tables. While the current system relies on a fixed tree height and assumes a well-typed schema, it sets the stage for more advanced "intent-aware" search engines that can automatically organize graph data into human-readable formats.

Summary updated

BibTeX
@article{yang2014finding,
  author = {Mohan Yang and Bolin Ding and Surajit Chaudhuri and Kaushik Chakrabarti},
  title = {{Finding Patterns in a Knowledge Base using Keywords to Compose Table Answers}},
  journal = {Proc. VLDB Endow.},
  year = {2014},
  doi = {10.14778/2733085.2733088},
}
Figure