arXiv

Contrastive Neural Algorithmic Reasoning for Graph Coloring

Title: Contrastive Neural Algorithmic Reasoning for Graph Coloring

Abstract:

Graph coloring involves assigning colors to a graph's vertices such that no two connected nodes share the same hue, with the primary objective of minimizing the total number of colors used. In this work, we investigate the problem of approximate $k$-coloring, which aims to restrict the palette to no more than $k$ colors while simultaneously reducing the count of monochromatic edges. This challenge is fundamental to graph theory and holds significant practical value in domains like resource allocation and scheduling.

While recent unsupervised Graph Neural Network (GNN) methods optimize solutions for individual instances, they fail to generalize across varying graph sizes and distributions. To address this limitation, we introduce a contrastive learning framework designed to acquire transferable coloring geometries. Within this framework, node embeddings corresponding to the same color are aligned, whereas representations of adjacent nodes are driven toward divergent directions.

We examine the population objective derived from this approach on graphs with bounded sizes. Specifically, for embeddings with unit norms, we demonstrate that the optimal solutions exhibit a line-prototype structure. In this configuration, nodes sharing a color converge onto a common one-dimensional subspace, while edges link these subspaces orthogonally. This geometric arrangement satisfies stationarity conditions found in supervised settings and remains invariant under projected subgradient dynamics, provided a balanced-coloring assumption holds. Furthermore, in an unnormalized variant, gradient descent exhibits a max-margin bias that is dictated by a hard-margin problem defined on a quotient graph.

Our experiments, conducted on both synthetic and real-world datasets, indicate that contrastive GNN encoders achieve strong generalization capabilities. They generate colorings with minimal conflicts, performing on par with, and occasionally surpassing, traditional greedy algorithms.


Source: arXiv Generated at: 2026-06-03 00:00:00 UTC

Related Articles

TikTok Billionaire Tops Ambani as Asia’s Second-Richest
Bloomberg

TikTok Billionaire Tops Ambani as Asia’s Second-Richest

TikTok founder surpasses Mukesh Ambani to become Asia’s second-richest person, marking a significant shift in the region...

Publishers in UK can opt out of Google AI search results
BBC News

Publishers in UK can opt out of Google AI search results

UK publishers can now opt out of Google’s AI search summaries, a CMA ruling designed to boost their bargaining power and...

Kioxia Edges Nearer Toyota’s Market Cap in Shakeup to Japan Inc.
Bloomberg

Kioxia Edges Nearer Toyota’s Market Cap in Shakeup to Japan Inc.

Kioxia’s market cap nears Toyota’s, signaling a major shift in Japan’s corporate hierarchy. This narrowing gap highlight...

Reuters

Morning Bid: Marvell, a fitting name for the latest AI darling

Reuters highlights Marvell as a top AI stock, noting its name perfectly suits its status as the newest market darling.

Financial Times

Tim Hayward: I built the Jaguar E-Type of computer keyboards

Tim Hayward compares his bespoke keyboard designs to the Jaguar E-Type. He explores high-end customization for personal ...

Financial Times

AI Labs: Zuckerberg’s $100bn gamble

Meta’s $100 billion AI investment aims to secure AI dominance, but questions remain whether sheer spending can outpace c...