Learned Indexes for Efficient Querying on Knowledge Graphs

Gaurav Dawra, Aanchal Gupta, Nandika Jain, Yogender Kumar, Jishnu Raj Parashar, Bapi Chatterjee, Raghava MutharajuISWC (Industry/Doctoral Consortium/Posters/Demos) 2025

Knowledge Graphs (KGs) like Wikidata and DBpedia have become the backbone of modern AI, powering everything from search engines to recommendation systems. However, as these graphs grow to include billions of "triples" (subject-predicate-object facts), querying them using SPARQL becomes a massive computational bottleneck.

A recent paper from researchers at IIIT-Delhi, titled "Learned Indexes for Efficient Querying on Knowledge Graphs," proposes a solution: moving away from "blind" data structures toward indexes that understand the distribution of the data they store.

The Problem: Distribution-Oblivious Indexing

Traditional databases rely on general-purpose data structures like B+ Trees or Hash Tables. These structures are "distribution-oblivious"—they function the same way whether data is perfectly uniform or wildly skewed.

In Knowledge Graphs, queries often involve complex "joins" (linking multiple facts together). When dealing with hundreds of millions of triples, the latency of traversing traditional indexes adds up quickly. The authors argue that existing optimization techniques miss a major opportunity: the underlying data distribution itself. If an index can "learn" the shape of the data, it can find the required information with far fewer memory lookups.

Methodology: The TBSP System

The researchers integrated RadixSpline, a "learned index" that uses shallow machine learning to predict data locations, into the TripleBit RDF store. The resulting system, TBSP (TripleBit with SplineIndex), utilizes a two-part mechanism:

  1. Spline Points: Discrete points are selected over the dataset to use linear interpolation for predicting key locations.
  2. Radix Table: A prefix-based table quickly narrows the search to a specific neighborhood of spline points.
The architecture of the Learned Chunk Index within the TBSP system, showing how SplineIndex instances map to data chunks in buckets.

As shown in the architecture above, the team adapted the spline construction to work at a localized "chunk" level. This required encoding subject-object pairs into sortable numeric formats and tuning parameters like error tolerance ((\epsilon)) and radix bits ((r)) to balance index size against query speed.

Experimental Results

The approach was evaluated using two major benchmarks: DBLP (350 million triples) and SP2Bench (100 million triples). TBSP was compared against established systems including Apache Jena, the original TripleBit, and RDF-3X.

Performance comparison of TBSP against other RDF stores on the DBLP dataset. Bold values indicate the best performance.

The results demonstrated that TBSP consistently outperformed or matched top-tier competitors. On the DBLP dataset, TBSP clocked Query 1 (Q1) at 0.0605 seconds, while Apache Jena took over 11 seconds. The gains were even more dramatic in the SP2Bench benchmark; for Query 2, TBSP took 53.73 seconds, whereas Apache Jena required 1,210.37 seconds and RDF-3X took 385.26 seconds.

Conclusion and Future Work

By modeling data as a cumulative distribution function (CDF), TBSP turns a search problem into a mathematical inference problem. This "shallow" ML approach provides the benefits of predictive indexing without the heavy computational overhead of deep neural networks.

While the current implementation focuses on static datasets, future research will explore how learned structures like ALEX or the PGM-index can handle frequent data updates. This paper opens the door for a new generation of self-optimizing database engines specifically tailored for the scale of modern Knowledge Graphs.

Summary updated

BibTeX
@inproceedings{dawra2025learned,
  author = {Gaurav Dawra and Aanchal Gupta and Nandika Jain and Yogender Kumar and Jishnu Raj Parashar and Bapi Chatterjee and Raghava Mutharaju},
  title = {{Learned Indexes for Efficient Querying on Knowledge Graphs}},
  booktitle = {ISWC (Industry/Doctoral Consortium/Posters/Demos)},
  year = {2025},
}
Figure