Abstract
We propose a multi-stage learning approach for pruning the search space of maximum clique enumeration, a fundamental computationally difficult problem arising in various network analysis tasks. In each stage, our approach learns the characteristics of vertices in terms of various neighborhood features and leverage them to prune the set of vertices that are likely not contained in any maximum clique. Furthermore, we demonstrate that our approach is domain independent -- the same small set of features works well on graph instances from different domains. Compared to the state-of-the-art heuristics and preprocessing strategies, the advantages of our approach are that (i) it does not require any estimate on the maximum clique size at runtime and (ii) we demonstrate it to be effective also for dense graphs. In particular, for dense graphs, we typically prune around 30% of the vertices resulting in speedups of up to 53 times for state-of-the-art solvers while generally preserving the size of the maximum clique (though some maximum cliques may be lost). For large real-world sparse graphs, we routinely prune over 99% of the vertices resulting in several tenfold speedups at best, typically with no impact on solution quality.
Introduction
The Maximum Clique Enumeration (MCE) problem asks us to find all the largest possible complete subgraphs (cliques) in a network. It is a cornerstone of network analysis, used in applications ranging from social network community detection to bioinformatics. However, MCE is computationally brutal; not only is it NP-hard to solve, but it is also NP-hard to even approximate the size of the maximum clique.
Traditional exact solvers often use techniques like $k$-core decomposition to prune the graph before starting the search. However, $k$-core pruning is often ineffective on dense graphs and requires an initial estimate of the maximum clique size—a "chicken and egg" problem because finding that estimate is itself a hard problem. This paper introduces a multi-stage machine learning framework that learns to prune away vertices unlikely to belong to a maximum clique, significantly reducing the search space.
Methodology
We propose a multi-stage probabilistic preprocessing approach. Rather than replacing traditional solvers, we use machine learning to "clean up" the input for them.
Multi-Stage Sparsification
A single-pass ML model often prunes "easy" low-degree vertices but struggles with "hard" vertices that appear central but do not belong to a maximum clique. By pruning in stages, the model in subsequent stages focuses only on the "hard" vertices left behind, allowing it to learn more subtle patterns. By using a high confidence threshold (e.g., $q=0.95$ or $0.98$) across multiple stages, the system prunes aggressively while rarely deleting a vertex that was actually part of a maximum clique.
Feature Engineering
We utilize 10 vertex features, ranging from standard metrics like degree and eigencentrality to statistical measures like Pearson’s chi-square statistics. A key novel feature is Local Chromatic Density, which measures the minimum number of colors needed to color a vertex's neighborhood. While calculating this exactly is NP-hard, using a greedy heuristic provides a powerful signal for whether a vertex belongs to a large clique, boosting cross-domain accuracy by nearly 10%.
Experimental Results
We evaluated our approach on a diverse set of real-world and synthetic graphs from the Network Repository, categorized into sparse and dense networks.
Dense Graphs
On graphs where traditional $k$-core pruning typically removes 0% of vertices, our approach pruned roughly 30% of vertices and 40% of edges. As shown in Table 1, this led to significant speedups, including a 53x speedup for the cliquer solver on the brock200-1 instance.
Sparse Graphs
The results on sparse networks were even more dramatic. On the socfb-B-anon network (3M vertices), the multi-stage approach pruned over 99% of the graph. A state-of-the-art solver that previously took 40 minutes to run finished in just 7 seconds after pruning. Table 2 illustrates these results across various domains, showing that models trained on a mix of domains performed almost as well as those trained on specific domains.
Discussion and Future Work
While the approach provides massive speedups, there is room for optimization. Currently, feature computation is single-threaded and recomputed at each stage. Future work will involve parallelization and dynamic graph algorithms to lower pruning time. Additionally, we aim to develop dynamic stopping criteria to decide when the graph is sufficiently small to stop pruning. While the size of the maximum clique was almost always preserved, some individual maximum cliques were occasionally lost in dense graphs; for applications requiring every single maximum clique, even more conservative confidence thresholds would be required.
Summary updated