Introduction
Knowledge Graphs (KGs) such as Wikidata and Freebase have become indispensable for structured data retrieval. While query languages like SPARQL offer precision, they require significant expertise. Keyword search remains the most accessible interface for general users. However, traditional keyword search engines often struggle with "semantic drift," where the resulting subgraphs fail to capture the user's specific intent, treating all keywords with equal weight. This often leads to disconnected or irrelevant "flat" results.
To address these challenges, we introduce Raks, a parallel search engine designed for "Radial Pattern" keyword searches. Raks allows users to distinguish between core entities and contextual information, delivering more relevant results with a 100x speedup over state-of-the-art sequential methods.
The Radial Pattern Query (RPQ)
Traditional keyword search algorithms typically aim to find a Steiner Tree—the smallest tree connecting all keywords. This approach often produces results where the primary entities of interest are peripheral.
Raks introduces the Radial Pattern Query (RPQ). In this model, users categorize keywords into two sets:
- Central Keywords ($K_c$): The primary focus of the query.
- Marginal Keywords ($K_m$): Contextual entities that should relate back to the central cluster.
The goal is to find a Radial Pattern Graph (RPG) where central keywords are tightly clustered, and marginal keywords connect specifically to this central core. This structure better reflects human cognitive organization, where supporting details orbit a central theme.
As shown in the figure above, a traditional tree might link two world leaders through a trivial "humorous award" node. In contrast, the radial approach identifies the more significant geopolitical relationship between their respective countries.
High-Performance Parallel Search
Finding the optimal connecting subgraph is an NP-Hard problem. As KGs scale to hundreds of millions of edges, sequential algorithms become prohibitively slow. Raks overcomes this through three key innovations:
1. Graph Coarsening and Weighting
Standard algorithms rely on fine-grained floating-point edge weights, which necessitate sequential priority queues (like Dijkstra's). Raks "coarsens" these weights into integer "activation levels." By grouping similar path weights into discrete buckets, the algorithm can explore multiple "equally good" paths simultaneously, unlocking massive data-parallelism.
2. Two-Phase Parallel Algorithm
The search process is divided into two distinct phases designed for GPU and multi-core CPU acceleration:
- Exploration Phase: A concurrent, BFS-like traversal that propagates signals from keywords across the graph. It records distances and traversal metadata in a "Node-Keyword Matrix."
- Recovering Phase: A reverse traversal that uses the matrix data to reconstruct the final subgraphs.
3. Lock-Free Execution
To maximize throughput, Raks utilizes a lock-free design. Multiple threads can update the same memory locations in the Node-Keyword Matrix simultaneously. Since they are writing identical shortest-path values at the same time, data consistency is maintained without the overhead of synchronization primitives.
Evaluation and Results
Raks was evaluated on two massive Wikidata datasets: WikiSmall (124M edges) and WikiLarge (271M edges).
The results demonstrate that Raks is consistently two orders of magnitude (100x) faster than traditional sequential engines like BANKS-II. On the WikiLarge dataset, Raks-GPU typically returns results in under one second, whereas competing methods often take tens of seconds or time out. Furthermore, user studies indicate that the radial constraint significantly improves precision by filtering out irrelevant "shortcut" paths that often plague Steiner Tree approximations.
Conclusion
Raks represents a significant step forward in making massive Knowledge Graphs searchable in real-time. By combining a more intuitive "radial" query structure with a high-performance parallel architecture, it bridges the gap between user intent and computational efficiency. Future work will focus on automating the categorization of central and marginal keywords and optimizing memory usage for even larger entity sets.
Summary updated