arXiv:2606.03923cs.LG2026-06

用对比学习让图着色模型跨图泛化,效果优于传统贪心法。

Contrastive Neural Algorithmic Reasoning for Graph Coloring

论文配图:Contrastive Neural Algorithmic Reasoning for Graph Coloring
图 1 · 摘自论文原文
  • 通过对比学习让同色节点嵌入对齐,邻接节点嵌入分离。
  • 在合成与真实图上均实现低冲突着色,性能超越贪心算法。
  • 理论揭示了最优解的线性原型结构,适合跨图迁移任务。

图着色旨在为图中节点分配颜色,使相邻节点颜色不同,并尽可能减少颜色数量。本文研究近似k-色问题:最多使用k种颜色,同时最小化单色边数量。该问题在图论中具有核心地位,广泛应用于调度与资源分配。现有无监督图神经网络方法针对每个图实例直接优化,难以跨图泛化。本文提出一种对比学习框架,学习可迁移的着色几何结构:同色节点嵌入对齐,邻接节点嵌入被推向不同方向。分析有限大小图上的群体目标,证明单位范数嵌入下最优解具有线性原型结构——同色节点坍缩至一维子空间,边连接正交子空间。该结构在监督设置下满足平稳条件,且在平衡着色假设下被投影次梯度动态保持。在非归一化变体中,梯度下降具有由商图硬边界问题决定的最大间隔偏置。在合成与真实图数据集上的实验表明,对比学习图编码器具有良好泛化能力,产生低冲突着色,性能匹配甚至超越贪心方法。

原文摘要 · Abstract (English)

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.

图神经网络图着色对比学习泛化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。