Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Contrastive Neural Algorithmic Reasoning for Graph Coloring

About

Graph coloring seeks to assigns colors to a graph's nodes so that adjacent nodes receive different colors, using as few colors as possible. Here, we study approximate $k$-coloring, where the goal is to use at most $k$ colors while minimizing the number of monochromatic edges. This problem is central to graph theory and has applications in areas such as scheduling and resource allocation. Recent unsupervised GNN approaches optimize each instance directly, precluding generalization across graph sizes and distributions. We instead propose a contrastive learning framework that learns transferable coloring geometry where the embeddings of same-color nodes align, while adjacent nodes' representations are pushed toward distinct directions. We analyze the resulting population objective over bounded-size graphs. For unit-norm embeddings, we show that its optima have a line-prototype structure: Representations of nodes of the same color collapse to a shared one-dimensional subspace, and edges connect orthogonal subspaces. This geometry yields stationarity conditions in the supervised setting and is preserved by projected subgradient dynamics under a balanced-coloring assumption. In an unnormalized variant, gradient descent has a max-margin bias governed by a quotient-graph hard-margin problem. Experiments on synthetic and real-world graphs show that contrastive GNN encoders generalize effectively and produce low-conflict colorings, matching and sometimes improving on greedy approaches.

Thien Le, Tianyu Zhao, Melanie Weber• 2026

Related benchmarks

TaskDatasetResultRank
Graph ColoringKG(9,3) (test)
k*9.5
4
Graph ColoringK_10 (test)
k* Estimate8.1
4
Graph ColoringK_{4,8} (test)
k* (Chromatic Number Estimate)2.8
4
Graph ColoringC_30 (test)
k*3.3
4
Graph ColoringC_31 (test)
Estimated Chromatic Number (k*)3.3
4
Graph ColoringW_14 (test)
k* (Chromatic Number Estimate)4.8
4
Graph ColoringPetersen (test)
k* (Petersen Test)4.6
4
Graph ColoringIcosahedral (test)
k* (Icosahedral Test)6
4
Graph ColoringMycielski(C5)^3 (test)
k* (Chromatic Number Estimate)8.7
4
Graph ColoringSmall 40 graphs
Completion Count40
3
Showing 10 of 21 rows

Other info

Follow for update