Scalable mining of large disk-based graph databases

Chen Wang, Wei Wang, Jian Pei, Yongtai Zhu, Baile Shi

Introduction

Frequent graph pattern mining—the process of identifying recurring sub-structures within a collection of graphs—is a critical task in domains ranging from drug discovery to web analysis. Historically, state-of-the-art algorithms like gSpan and FSG were designed under the assumption that the entire graph database could reside in main memory. However, as datasets grew to include millions of chemical compounds or complex XML documents, these in-memory approaches hit a "memory wall."

When databases exceed available RAM, traditional algorithms become severely I/O bound, suffering from excessive random disk accesses during subgraph isomorphism checks. This paper introduces the Adjacency Index (ADI) and the ADI-Mine algorithm to transition graph mining into a scalable, disk-based paradigm.

The Adjacency Index (ADI) Structure

The core innovation is the ADI, a specialized three-level index structure designed to minimize disk I/O by organizing graph data logically and physically for efficient retrieval.

The ADI structure showing the Edge Table, Graph-ID lists, and physical Adjacency blocks.

As illustrated in the figure above, the ADI consists of:

  1. Edge Table: A sorted repository of all distinct edges (defined by vertex and edge labels), allowing for rapid identification of "seed" edges.
  2. Linked Lists of Graph-IDs: For each distinct edge, the index maintains a list of IDs for all graphs containing that edge. This enables the algorithm to verify edge-host graph relationships without scanning the entire database.
  3. Adjacency Information: Structural details are stored in physical disk blocks. By grouping edges from the same graph together, the system can perform sequential reads of a graph's neighborhood, significantly reducing expensive random seeks.

Building upon this index, the authors developed ADI-Mine. This algorithm adapts the depth-first search (DFS) strategy popularized by gSpan to work natively with the ADI structure. Instead of performing exhaustive database scans, ADI-Mine uses the index to filter out irrelevant graphs and only loads the specific adjacency data required to grow a frequent pattern.

Illustration of a graph (G), its subgraph (G'), and corresponding DFS-tree representations (T1, T2).

By representing graphs as DFS trees (as shown above), the algorithm can systematically explore the search space. The ADI structure ensures that as the search progresses, only the necessary structural information is fetched from the disk, maintaining high performance even as the complexity of the patterns increases.

Key Results and Insights

The transition to a disk-based index yielded several significant performance breakthroughs:

  • Massive Capacity: ADI-Mine successfully processed databases containing one million graphs. In contrast, traditional in-memory gSpan implementations typically failed due to memory exhaustion after approximately 300,000 graphs.
  • Overcoming the "Label Wall": A major finding was that gSpan’s performance degrades exponentially as the variety of labels ($N$) increases. ADI-Mine exhibits linear scaling because its index allows it to jump directly to relevant edges, bypassing the complexity introduced by a high number of distinct labels.
  • In-Memory Efficiency: Even when the dataset fits entirely in RAM, ADI-Mine outperformed gSpan by roughly 10x. The index structure simplifies the search for frequent edges, reducing the computational overhead of the mining process.

Conclusion

ADI-Mine represents a significant step forward in making frequent graph mining practical for real-world, large-scale applications. By prioritizing sequential I/O and utilizing a multi-level index, the researchers demonstrated that disk-based mining can be both faster and more scalable than traditional in-memory methods. While the initial index construction requires two database scans, the resulting structure serves as a permanent optimization that can be reused across multiple mining tasks with varying support thresholds.

Summary updated

BibTeX
@inproceedings{wang2004scalable,
  author = {Chen Wang and Wei Wang and Jian Pei and Yongtai Zhu and Baile Shi},
  title = {{Scalable mining of large disk-based graph databases}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2004},
  doi = {10.1145/1014052.1014088},
}
Figure