Node coloring is the task of assigning colors to the nodes of a graph such that no two adjacent nodes have the same color, while using as few colors as possible. It is the most widely studied instance of graph coloring and of central importance in graph theory; major results include the Four Color Theorem and work on the Hadwiger-Nelson Problem. As an abstraction of classical combinatorial optimization tasks, such as scheduling and resource allocation, it is also rich in practical applications. Here, we focus on a relaxed version, approximate $k$-coloring, which is the task of assigning at most $k$ colors to the nodes of a graph such that the number of edges whose vertices have the same color is approximately minimized. While classical approaches leverage mathematical programming or SAT solvers, recent studies have explored the use of machine learning. We follow this route and explore the use of graph neural networks (GNNs) for node coloring. We first present an optimized differentiable algorithm that improves a prior approach by Schuetz et al. with orthogonal node feature initialization and a loss function that penalizes conflicting edges more heavily when their endpoints have higher degree; the latter inspired by the classical result that a graph is $k$-colorable if and only if its $k$-core is $k$-colorable. Next, we introduce a lightweight greedy local search algorithm and show that it may be improved by recursively computing a $(k-1)$-coloring to use as a warm start. We then show that applying such recursive warm starts to the GNN approach leads to further improvements. Numerical experiments on a range of different graph structures show that while the local search algorithms perform best on small inputs, the GNN exhibits superior performance at scale. The recursive warm start may be of independent interest beyond graph coloring for local search methods for combinatorial optimization.
翻译:节点着色任务是为图的节点分配颜色,使得任意相邻节点颜色不同,同时尽可能使用最少的颜色数。这是图着色问题中研究最广泛的实例,在图论中具有核心重要性;其主要成果包括四色定理及Hadwiger-Nelson问题的相关研究。作为调度与资源分配等经典组合优化任务的抽象模型,该问题也具有丰富的实际应用价值。本文聚焦于其松弛版本——近似$k$着色,该任务要求至多使用$k$种颜色对图节点进行着色,并使端点颜色相同的边数近似最小化。传统方法多采用数学规划或SAT求解器,而近期研究开始探索机器学习技术的应用。我们沿此方向,研究图神经网络在节点着色问题中的应用。首先,我们提出一种优化的可微分算法,该算法改进了Schuetz等人先前的工作,采用正交节点特征初始化策略,并设计了新的损失函数——当冲突边端点度数较高时施加更重的惩罚;后者灵感来源于经典结论:图具有$k$可着色性当且仅当其$k$-核具有$k$可着色性。其次,我们提出一种轻量级贪心局部搜索算法,并证明通过递归计算$(k-1)$着色作为预热启动可提升其性能。进一步研究表明,将此类递归预热启动策略应用于GNN方法能带来额外改进。在不同图结构上的数值实验表明:虽然局部搜索算法在小规模输入上表现最佳,但GNN在大规模问题上展现出更优越的性能。这种递归预热启动策略对于组合优化中局部搜索方法的研究可能具有超越图着色问题的独立价值。