This paper presents a breakthrough in processing massive graphs, specifically for the fundamental task of $k$-core decomposition. While traditional algorithms struggle when graphs exceed a machine's RAM, the authors propose a suite of "semi-external" algorithms that can process web-scale graphs—like a snapshot of the web with 42.6 billion edges—using just a few gigabytes of memory.
TL;DR
The authors introduce the first semi-external $k$-core decomposition and maintenance algorithms that provide guaranteed memory bounds by keeping only node metadata in RAM while streaming edges from disk. Their optimized approach, SemiCore*, is an order of magnitude faster than previous disk-based methods and can handle a billion-node graph on a standard desktop PC.
What Problem Does This Paper Address?
A $k$-core of a graph is a maximal subgraph where every node has at least $k$ neighbors within that subgraph. Finding these cores (core decomposition) is vital for community detection, network visualization, and identifying influential nodes.
The challenge is scale. Modern social and web graphs are gargantuan. While a standard in-memory algorithm is fast, it requires the entire graph to reside in RAM. For a graph like Facebook's, this is impossible on a single machine. Previous "external memory" solutions (like EMCore) tried to solve this by partitioning the graph on disk, but they lacked strict memory bounds and often ended up loading most of the graph into RAM anyway, failing to scale. Furthermore, these older methods couldn't efficiently handle dynamic updates—adding or removing a single edge often required recomputing everything from scratch.
Methods
The authors adopt a semi-external model. They assume that while the edges ($E$) are too large for RAM, the nodes ($V$) are not. By storing only a small amount of information per node (like its current core number) in memory and keeping the massive adjacency lists on disk, they achieve a memory complexity of $O(n)$.
Key Algorithms:
SemiCore(Basic): Uses a "locality property" where a node's core number is iteratively updated based on its neighbors' values. It performs sequential scans of the edge list on disk until all core numbers converge.SemiCore+(Optimized): Introduces anactiveflag. A node is only recomputed if at least one of its neighbors changed in the previous iteration. This drastically reduces wasted I/O as the algorithm nears convergence.SemiCore*(Optimal): Maintains a countercnt(v)for each node, representing how many neighbors have a core number $\ge$ the node's current value. A node is only recomputed ifcnt(v)drops below its current core number.- Core Maintenance (
SemiInsert*/SemiDelete*): Novel algorithms to update core numbers incrementally when edges are added or removed, avoiding full recomputations.
Datasets
The researchers evaluated their work on 12 real-world datasets, split into two groups:
- Small Graphs: DBLP, Youtube, WIKI, CPT, LJ, and Orkut (up to 117M edges).
- Web-Scale Graphs: Webbase, IT, Twitter, SK, UK, and the massive Clueweb.
- Clueweb Stats: 978.4 million nodes and 42.6 billion edges. This represents one of the largest graph processing benchmarks handled on a single machine in the literature at the time.
Key Insights and Ideas
- Sequential I/O is King: Even though disk access is slower than RAM, the algorithms use sequential scans. Modern hardware handles sequential reads very efficiently, allowing these disk-based methods to sometimes outperform in-memory algorithms that suffer from random RAM access patterns on large datasets.
- The Power of Sparsity in Updates: As shown in Figure 3, the number of nodes changing their core numbers drops exponentially across iterations. By tracking "active" nodes, the algorithm avoids loading billions of edges that wouldn't contribute to the final result.
- One-Phase Maintenance: For edge insertions, the authors moved from a two-phase "find and update" approach to a more efficient one-phase approach using a state-tracking mechanism ($\phi, ?, \sqrt{}, \times$) to manage node expansions.
Key Results
- Efficiency:
SemiCore*is roughly 10x faster than the previous state-of-the-art disk-based algorithm (EMCore). - Memory Footprint: To process the 42.6-billion-edge Clueweb graph,
SemiCore*required less than 4.2 GB of RAM. In contrast,EMCorecould not handle the larger datasets due to memory overflow. - Maintenance Speed: For dynamic updates, their
SemiInsert*algorithm is comparable in speed to state-of-the-art in-memory update algorithms while using significantly less memory. - Scalability: The processing time scales linearly with the number of edges, and memory usage scales linearly with the number of nodes, confirming the robustness of the semi-external model.
Limitations and Future Work
- Node Limit: The $O(n)$ memory requirement means that if a graph has so many nodes that even the metadata (core numbers and counters) exceeds RAM, this algorithm will fail. For example, a graph with 100 billion nodes would require hundreds of gigabytes of RAM just for the node arrays.
- Iterative Nature: The number of iterations ($l$) can vary depending on the graph structure. While usually small in practice, a "pathological" graph structure could theoretically lead to many iterations, increasing I/O costs.
- Future Directions: The authors suggest exploring these semi-external techniques for other complex graph problems, such as dense subgraph discovery or truss decomposition.
Summary updated