Abstract
The Set Cover Problem (SCP) is a fundamental NP-hard combinatorial optimization problem with wide-ranging applications in logistics, scheduling, and facility location. While exact solvers like Gurobi guarantee optimality, their computational cost scales exponentially with problem size. We propose Graph-SCP, a framework that utilizes Graph Neural Networks (GNNs) to prune the search space of SCP instances. By identifying a small subset of candidate sets likely to form the optimal cover, Graph-SCP significantly reduces the workload for downstream solvers. Our approach incorporates novel hypergraph Laplacian features to capture global structural dependencies. Empirical evaluations show that Graph-SCP achieves up to 10x average speedups over Gurobi while consistently reaching optimal objective values.
Introduction
The Set Cover Problem (SCP) asks for the minimum-cost collection of sets from a given family that covers all elements in a universe. As an NP-hard problem, SCP presents a classic trade-off: exact solvers provide optimal solutions but are slow for large instances, while greedy heuristics are fast but often yield sub-optimal results. Graph-SCP bridges this gap by using machine learning to shrink the problem size before passing it to an exact solver, effectively combining the speed of heuristics with the rigor of exact methods.
Methodology
Graph-SCP operates by transforming an SCP instance into a graph-based representation and using a GNN to predict the probability of each set being part of the optimal solution.
Graph Representation and Feature Engineering
An SCP instance is modeled as a bipartite graph where nodes represent elements and sets (columns). A key innovation in Graph-SCP is the use of Hypergraph Laplacian features. By treating sets as hyperedges, the framework calculates eigenvalues that represent the "algebraic connectivity" of the problem. This allows the model to identify sets that are structurally critical for covering the universe, moving beyond simple local metrics like node degree.
The Graph-SCP Pipeline
The framework follows an iterative "predict-and-solve" loop. A 2-layer GraphSAGE model, trained with a hybrid supervised-unsupervised loss, generates predictions. A high-probability subset of sets is selected and passed to a solver. If the resulting sub-problem is infeasible, the threshold is lowered to include more sets, and the solver is re-run using a "warm-start" to minimize redundant computation.
Experimental Evaluation
The framework was tested on synthetic instances with varying densities and cost distributions, as well as canonical benchmarks from the OR Library. Training was performed on instances with up to 3,000 subsets, while testing included larger instances with up to 10,000 subsets to evaluate generalization.
Key Insights
Ablation studies highlighted the critical role of feature engineering. Specifically, features derived from the hypergraph representation were the most significant contributors to the model's ability to distinguish between solution and non-solution nodes.
As shown in the embedding visualizations, the inclusion of hypergraph features (moving from right to left in the figure) increases the inter-cluster distance between solution nodes (red) and non-solution nodes (green), facilitating more effective pruning.
Results
Graph-SCP achieved a 10x average speedup over Gurobi, with peak speedups reaching 70x. The framework successfully reduced the number of candidate sets by 60–80% on average, and up to 96% on certain benchmarks. Crucially, the method maintained 100% solution quality, consistently reaching the optimal objective value. Furthermore, Graph-SCP demonstrated strong generalization capabilities, effectively accelerating problems significantly larger than those seen during training.
Conclusion
Graph-SCP demonstrates that pruning the input space via GNNs is a highly effective strategy for accelerating combinatorial optimization. By leveraging hypergraph structural features and an iterative refinement process, the framework provides a scalable way to solve NP-hard problems optimally. Future work will explore applying this pruning philosophy to other domains such as the Traveling Salesperson Problem (TSP).
Summary updated