Table of Contents
Fetching ...

Efficient Graph Coloring with Neural Networks: A Physics-Inspired Approach for Large Graphs

Lorenzo Colantonio, Andrea Cacioppo, Federico Scarpati, Stefano Giagu

TL;DR

This work tackles the NP-hard graph coloring problem by introducing a physics-inspired graph neural network that optimizes a differentiable Potts-energy objective. By training on Erdos–Rényi graphs and quiet-planting with known colorings, the model learns to minimize conflicts and break color-symmetry via an overlap term, then iteratively colors graphs with a noise-scheduled forward pass. Empirical results show favorable energy scaling and faster convergence than simulated annealing across a broad range of connectivities, and the approach scales to very large graphs on GPUs while preserving performance. The combination of a differentiable energy objective, planted supervision, and parallelizable GNNs demonstrates a promising route to scalable, high-quality graph coloring in practical settings.

Abstract

The graph coloring problem is an optimization problem involving the assignment of one of q colors to each vertex of a graph such that no two adjacent vertices share the same color. This problem is NP-hard and arises in various practical applications. In this work, we present a novel algorithm that leverages graph neural networks to tackle the problem efficiently, particularly for large graphs. We propose a physics-inspired approach that leverages tools used in statistical mechanics to improve the training and performance of the algorithm. The scaling of our method is evaluated for different connectivities and graph sizes. Finally, we demonstrate the effectiveness of our method on a dataset of Erdos-Renyi graphs, showing its applicability also in hard-to-solve connectivity regions where traditional methods struggle.

Efficient Graph Coloring with Neural Networks: A Physics-Inspired Approach for Large Graphs

TL;DR

This work tackles the NP-hard graph coloring problem by introducing a physics-inspired graph neural network that optimizes a differentiable Potts-energy objective. By training on Erdos–Rényi graphs and quiet-planting with known colorings, the model learns to minimize conflicts and break color-symmetry via an overlap term, then iteratively colors graphs with a noise-scheduled forward pass. Empirical results show favorable energy scaling and faster convergence than simulated annealing across a broad range of connectivities, and the approach scales to very large graphs on GPUs while preserving performance. The combination of a differentiable energy objective, planted supervision, and parallelizable GNNs demonstrates a promising route to scalable, high-quality graph coloring in practical settings.

Abstract

The graph coloring problem is an optimization problem involving the assignment of one of q colors to each vertex of a graph such that no two adjacent vertices share the same color. This problem is NP-hard and arises in various practical applications. In this work, we present a novel algorithm that leverages graph neural networks to tackle the problem efficiently, particularly for large graphs. We propose a physics-inspired approach that leverages tools used in statistical mechanics to improve the training and performance of the algorithm. The scaling of our method is evaluated for different connectivities and graph sizes. Finally, we demonstrate the effectiveness of our method on a dataset of Erdos-Renyi graphs, showing its applicability also in hard-to-solve connectivity regions where traditional methods struggle.
Paper Structure (20 sections, 22 equations, 9 figures, 2 tables, 3 algorithms)

This paper contains 20 sections, 22 equations, 9 figures, 2 tables, 3 algorithms.

Figures (9)

  • Figure 1: Phase transitions in the graph coloring problem from zdeborova2007phase.
  • Figure 2: Comparison of the scaling of conflicting with the number of iterations
  • Figure 3: Scaling of fit parameters $A$, $B$ and $C$. $c_c$, $c_d$, $c_r$ and $c_s$ correspond to phase transitions, while $[c_{min}, c_{max}]$ is the training set connectivity range.
  • Figure 4: Scaling of the fraction of conflicts for different number of nodes. Planted graphs (left) and random graphs (right) are displayed side by side, for different connectivity values.
  • Figure 5: Percentage of conflicting edges at each iteration step during a coloring loop for different connectivities. Coloring with (without) noise is represented in red (blue). Two standard deviations are reported with a lighter coloring.
  • ...and 4 more figures