Abstract
Heterogeneous information networks (HINs) represent different types of entities and relationships between them. Exploring, analysing, and extracting knowledge from such networks relies on metapath queries that identify pairs of entities connected by relationships of diverse semantics. While the real-time evaluation of metapath query workloads on large, web-scale HINs is highly demanding in computational cost, current approaches do not exploit interrelationships among the queries. In this paper, we present ATRAPOS, a new approach for the real-time evaluation of metapath query workloads that leverages a combination of efficient sparse matrix multiplication and intermediate result caching. ATRAPOS selects intermediate results to cache and reuse by detecting frequent sub-metapaths among workload queries in real time, using a tailor-made data structure, the Overlap Tree, and an associated caching policy. Our experimental study on real data shows that ATRAPOS accelerates exploratory data analysis and mining on HINs, outperforming off-the-shelf caching approaches and state-of-the-art research prototypes in all examined scenarios.
Introduction
Heterogeneous Information Networks (HINs) have emerged as a powerful abstraction for modeling complex data where nodes and edges belong to multiple types. To extract semantic knowledge from these networks, researchers utilize metapaths—sequences of node and edge types that define specific relationships, such as "Author-Paper-Topic-Paper-Author" to identify researchers working in similar domains.
Evaluating these metapaths on large-scale HINs is computationally intensive, typically requiring a series of expensive matrix multiplications. In practical exploratory scenarios, users often execute "workloads"—batches of related queries. Existing systems often evaluate these queries in isolation, failing to exploit the significant redundancy present when metapaths share common sub-sequences. ATRAPOS addresses this gap by identifying and caching these overlaps in real time.
Methodology
ATRAPOS introduces three primary optimizations to handle metapath query workloads efficiently.
Sparsity-Aware Multiplication
HIN adjacency matrices are typically very sparse. ATRAPOS utilizes sparse matrix representations and a dynamic programming approach with a specialized cost model. This model determines the optimal multiplication order, minimizing the computational overhead for sparse data structures.
The Overlap Tree (OTree)
The core innovation of ATRAPOS is the Overlap Tree, a data structure inspired by generalized suffix trees. By treating metapaths as strings of node types, the OTree tracks the frequency of sub-metapaths as queries arrive.
As shown in Figure 4, each node in the tree represents a sub-metapath and stores metadata such as frequency ($f$), computation cost ($c$), and a pointer ($p$) to the cached result. This allows ATRAPOS to detect overlaps between queries instantly and reuse previously computed intermediate results.
ATRAPOS-OTree Caching Policy
Unlike standard LRU policies, the ATRAPOS caching policy is cost-aware. It accounts for the fact that matrix products vary wildly in computation cost and memory footprint. The policy prioritizes caching results that are expensive to recompute and frequently used, while also considering the interdependence between nested metapaths.
Experimental Setup
The performance of ATRAPOS was evaluated using two large-scale real-world datasets, significantly larger than those typically used in the literature.
- Scholarly HIN: Derived from AMiner’s DBLP data and EU Horizon 2020 projects, containing up to 12.15M nodes and 190.99M edges across types like Papers, Authors, and Venues.
- News Articles HIN: Based on GDELT and Panama Papers data, featuring up to 12.43M nodes and 298.11M edges involving Articles, Organizations, and Locations.
Results and Discussion
Experimental results demonstrate that ATRAPOS significantly outperforms both industry standards and optimized research baselines:
- Industry Comparison: ATRAPOS is over an order of magnitude faster than Neo4j and two orders of magnitude faster than the original dense-matrix HRank implementation.
- Optimized Baselines: Compared to a sparse-optimized version of HRank, ATRAPOS provides a 23-27% speedup solely due to its overlap detection and caching mechanisms.
- Cache Efficiency: The OTree-based caching policy consistently outperformed standard LRU and PGDS policies, particularly under memory constraints, by effectively managing sub-metapath dependencies.
Conclusion and Future Work
ATRAPOS provides a robust framework for real-time metapath evaluation by treating query workloads as a unified optimization problem. Future research directions include extending the system to distributed environments (e.g., Spark) and adapting the Overlap Tree to handle high-velocity graph updates in dynamic HINs. Additionally, integrating approximation techniques could further enhance performance for error-tolerant applications.
Summary updated