GraphCache: A Caching System for Graph Queries

Jing Wang, Nikos Ntarmos, Peter TriantafillouEDBT 2017

Abstract

GraphCache (GC) is a novel caching system designed specifically for subgraph and supergraph queries. Unlike traditional exact-match caches, GC leverages semantic relationships between queries to bypass expensive NP-complete subgraph isomorphism (SI) tests. By identifying subgraph and supergraph relationships, GC achieves query speedups of up to 40x with minimal memory overhead. This paper describes the architecture of GraphCache, its semantic caching logic, and its performance across diverse real-world and synthetic datasets.

Introduction

The search for specific patterns within massive graph datasets—such as molecular structures in chemical databases or motifs in biological networks—is a fundamental problem in graph analytics. This task typically involves solving the subgraph isomorphism (SI) problem, which is NP-complete and computationally grueling. While "filter-then-verify" (FTV) methods have been developed to prune the search space, they often perform redundant SI tests when similar queries are submitted repeatedly.

Traditional caching systems are "exact-match" only; they fail to provide benefits if a new query is slightly different from a previous one, even if the results are logically related. GraphCache addresses this limitation by implementing a cache that understands the topology of the queries themselves, allowing it to provide hits based on semantic relationships.

System Architecture

GraphCache is designed as a pluggable front-end that can be integrated with any existing graph query algorithm. The system architecture is divided into two main components: the Query Processing Runtime and the Cache Manager.

The high-level architecture of GraphCache, showing the Query Processing Runtime and Cache Manager components.

The Query Processing Runtime manages incoming queries, utilizing specialized processors for subgraph and supergraph relationships. The Cache Manager handles the storage and retrieval of cached queries, answers, and metadata, ensuring efficient resource utilization through advanced admission and replacement policies.

Semantic Caching and Logic

The core innovation of GraphCache is its Semantic Caching mechanism. When a query $g$ arrives, GC does not merely look for an identity match. Instead, it analyzes the hierarchical relationships between $g$ and previously cached queries.

Subgraph and Supergraph Pruning

If a query $g$ is a subgraph of a cached query $g'$, GC knows that any graph containing $g'$ must also contain $g$. This allows the system to instantly populate a portion of the answer set and skip redundant SI tests. Conversely, if $g$ is a supergraph of $g'$, the cached results of $g'$ can be used to further refine the candidate set for $g$.

The logic for handling subgraph and supergraph cases to reduce the number of required subgraph isomorphism tests.

Admission Control and Replacement

To maintain efficiency, GC employs Admission Control to prevent "cache pollution." It only admits queries where the verification time (the computationally expensive part) significantly outweighs the filtering time. For cache replacement, the authors proposed the Hybrid Dynamic (HD) policy, which accounts for the actual time-cost saved by a cached query rather than just the frequency of access.

Performance Evaluation

The system was stress-tested against over 6 million queries using both real-world datasets (e.g., AIDS molecular graphs, PDBS protein structures) and synthetic datasets.

Key results include:

  • Massive Speedups: GC achieved query time speedups ranging from 1.6x to over 42x depending on the dataset.
  • Candidate Reduction: The number of required SI tests was often reduced by an order of magnitude.
  • Low Overhead: The memory footprint of GraphCache is remarkably small, often using less than 1% of the memory required for a full FTV index, while providing comparable or superior performance.

Conclusion

GraphCache demonstrates that semantic awareness is a powerful tool for optimizing graph queries. By bypassing redundant NP-complete tests through topological analysis, it provides a scalable and efficient solution for large-scale graph analytics. Future work will focus on extending these techniques to single, massive graphs and distributed computing environments.

Summary updated

BibTeX
@inproceedings{wang2017graphcache,
  author = {Jing Wang and Nikos Ntarmos and Peter Triantafillou},
  title = {{GraphCache: A Caching System for Graph Queries}},
  booktitle = {EDBT},
  year = {2017},
  doi = {10.5441/002/edbt.2017.03},
}
Figure