Property Graph Schema Optimization for Domain-Specific Knowledge Graphs

Rana Alotaibi, Chuan Lei, Abdul Quamar, Vasilis Efthymiou, Fatma Özcan

This paper, presented by researchers from IBM Research - Almaden and UCSD, introduces a novel framework for optimizing property graph schemas. By leveraging the rich semantic information found in domain ontologies, the authors demonstrate how to restructure graph data to drastically reduce query latency.

TL;DR

The authors propose the first ontology-driven approach to optimize property graph schemas for domain-specific knowledge graphs. By strategically "denormalizing" relationships and merging nodes based on a cost-benefit model, they achieve up to two orders of magnitude (100x) speedup in query performance compared to standard direct-mapping approaches.

What Problem Does This Paper Address?

Enterprises increasingly rely on domain-specific knowledge graphs (KGs) in fields like medicine and finance. These KGs are typically defined by ontologies—formal frameworks that describe entities and their complex relationships.

The standard way to store this data in a graph database (like Neo4j) is "Direct Mapping," where every ontology concept becomes a node and every relationship becomes an edge. However, this often leads to "the traversal tax": a simple query might require hopping through many intermediate nodes (e.g., traversing an inheritance hierarchy or a union concept) just to find a specific attribute. This kills performance, especially as datasets scale. The challenge is to find a way to restructure the graph to minimize these hops without blowing up the storage requirements (space-performance trade-off).

Methods

The authors introduce a set of Relationship Rules and two optimization algorithms to transform a standard ontology into an optimized property graph schema (PGS).

1. Relationship Rules

  • Union Rule: Eliminates intermediate "union" nodes by connecting member concepts directly to related entities.
  • Inheritance Rule: Uses Jaccard similarity to decide whether to push properties from a parent concept down to its children (or vice versa) to avoid "isA" edge traversals.
  • 1:1, 1:M, and M:N Rules: Similar to database denormalization, these rules merge nodes or propagate properties as LIST types to allow local lookups instead of multi-hop joins.

2. Optimization Algorithms

  • Concept-Centric Algorithm: Uses a modified PageRank (OntologyPR) to identify "key concepts" in the ontology. It prioritizes optimizing relationships around these central hubs.
  • Relation-Centric Algorithm: Models schema optimization as a 0/1 Knapsack Problem. It calculates a "Benefit" (based on query access frequency) and a "Cost" (extra storage space from replication) for every possible optimization. It then uses a near-optimal approximation (FPTAS) to select the best set of rules to apply within a given space budget.

Datasets

The approach was evaluated using two large-scale, real-world datasets:

  • Medical (MED): Based on the Unified Medical Language System (UMLS). It contains ~12 GB of data with 43 concepts and 58 relationships.
  • Financial (FIN): Based on SEC and FDIC filings. It is significantly larger at ~53 GB, featuring 28 concepts and 138 complex relationships.
  • Backends: Evaluations were performed on both Neo4j (disk-based) and JanusGraph (distributed).

Key Insights and Ideas

  • Ontology as a Physical Design Guide: Most researchers treat ontologies as purely logical definitions. This paper argues they are actually blueprints for physical graph design.
  • The Power of Denormalization: Just as in the RDBMS world, "flat" is often "fast." By replicating certain properties (e.g., turning a 1:M relationship into a list attribute on a node), the system can answer queries with zero edge traversals.
  • Global vs. Local Optimization: The Relation-Centric approach consistently outperformed the Concept-Centric one. This is because the Knapsack model considers the global space budget, ensuring that storage is "spent" on the optimizations that provide the highest aggregate performance boost across the entire workload.
  • Disk-I/O Sensitivity: The performance gains were even more dramatic on Neo4j than JanusGraph. Because Neo4j is disk-based, reducing traversals directly translates to fewer expensive disk reads.

Key Results

  • Massive Speedups: The optimized schemas achieved up to 100x speedup for complex pattern matching and aggregation queries.
  • Efficiency under Constraints: With a space budget of only 20% of the maximum possible "denormalization," the Relation-Centric algorithm still captured over 50% of the total potential performance benefit.
  • Traversal Elimination: In several microbenchmarks, the number of edge traversals was reduced from tens of thousands to zero, as the required data was moved directly into the starting vertex.
  • Low Overhead: The optimization algorithms themselves are highly efficient, producing optimized schemas for complex ontologies in less than one second.

Limitations and Future Work

  • Schema Evolution: The current framework assumes a relatively static schema. The authors note that handling frequent updates to the ontology or data distribution (which might invalidate previous optimizations) is a challenge for future research.
  • Expressivity Limits: The paper focuses on common ontology features but acknowledges that capturing the full expressivity of OWL (like complex negation or transitivity) in a property graph remains an open problem.
  • Workload Knowledge: The Relation-Centric model performs best when query access frequencies are known. While it can fall back to a uniform distribution, its "intelligence" is tied to the accuracy of the workload summary.

Summary updated

BibTeX
@inproceedings{alotaibi2021property,
  author = {Rana Alotaibi and Chuan Lei and Abdul Quamar and Vasilis Efthymiou and Fatma Özcan},
  title = {{Property Graph Schema Optimization for Domain-Specific Knowledge Graphs}},
  booktitle = {ICDE},
  year = {2021},
  doi = {10.1109/icde51399.2021.00085},
}
Figure