Нахождение хроматического числа графа с помощью методов глубокого обучения

Автор: Холькин Сергей Денисович, Филимонов Андрей Викторович

Журнал: Проблемы информатики @problem-info

Рубрика: Теоретическая и системная информатика

Статья в выпуске: 1 (54), 2022 года.

Бесплатный доступ

Алгоритмы глубокого обучения сильно развились в последнее десятилетие и стали стандартом во многих сферах. Притом количество архитектур глубокого обучения растет и существуют модели, работающие со структурой графа Graph Neural Network или GNN, которые показали свою эффективность в различных доменах. Также глубокое обучение применяют и для решения задач комбинаторной оптимизации. Поскольку многие задачи комбинаторной оптимизации изначально формулируются в терминах теории графов или же могут быть конвертированы в подобное представление, то архитектура GNN может стать эффективным методом для их приблизительного решения. В этой работе рассматривается задача о нахождении хроматического числа графа и ее приблизительное решение с помощью GNN. Вершины и цвета, в которые предположительно можно раскрасить граф, задаются случайными эмбеддингами, далее GNN, с учетом структуры графа, преобразовывает все эмбеддинги и производит на их основе бинарную классификацию, может граф быть раскрашен в данное количество цветов или нет. Данные для обучения сети являются сгенерированными и представляют собой сложные случаи раскраски. Также для тестирования обобщенности приведены замеры на данных, сильно отличающихся от тренировочных. Натренированная на синтетических данных GNN сравнивается по точности и времени исполнения с эвристиками: tabucol и жадный алгоритм.

Еще

Нейронная сеть, глубокое обучение, хроматическое число графа, комбинаторная оптимизация

Короткий адрес: https://sciup.org/143179068

IDR: 143179068   |   УДК: 004.855.5   |   DOI: 10.24412/2073-0667-2022-1-42-54

Finding graph chromatic number through deep learning

Deep learning in recent years has become state-of-the-art type of algorithms in various spheres such as computer vision and natural language processing. Number of deep learning architectures is growing and so is field of processing graphs through these architectures. Graph Neural Network (GNN) is deep learning architecture that have an ability to reflect graph structure and learn various patterns that are effectively used in graph related domains such as drug discovery or traffic forecasting. GNN embeds vertices as vectors that reflect vertex related features that are updated by function that depends on vertex neighbors, in some ways that can be interpreted as message passing between vertices, also update function is permutation invariant what gives GNN unique ability not to depend on vertices order or vertices number, graph of any size can be fed into particular GNN. Many studies on applying deep learning technics for combinatorial optimization is underway and since many combinatorial problems either originally represented in terms of graph theory or can be converted to such, GNN seems to be a natural choice for finding their approximate solutions. Recent studies confirm this by showing great results in solving Travelling Salesman Problem or Boolean Satisfiability Problem. In this paper we train GNN to find chromatic number of graph or to solve decision version of Graph Coloring Problem. Neural Network is trained in supervised manner as a binary classifier, given graph and number of colors model should return a probability that graph can or cannot be colored by given number of colors. Should be noticed that GNN finds chromatic number but doesn’t find vertices coloring itself, hence GNN can predict lower chromatic. Model architecture reflect color-vertex relationship by assigning vector embedding to each color and passing them into update embeddings function so they are treated like vertices embeddings. GNN is built in a recurrent manner with adjustable number of timesteps that reflect depth of message passing between vertices. At every timestep of recurrency model updates vertex and colors embeddings through aggregating information from its neighbors and/or colors through recurrent unit that stands as an update function (Long Short-Term Memory network with LaverNorm in our case). For additional expressivity MLP layers were added before recurrent unit at each timestep. After embedding updates vertices embeddings are being fed into classifier MLP to get a probability that graph is able to be colored by given number of colors. For training GNN in supervised manner labeled data is needed. Natural datasets related to graph coloring are unsuitable for training and validation through heterogeneity and small size. Data was generated following phase transition paradigm, for each graph instance in dataset we have a paired one that differs only by one edge but have higher chromatic number and that pair reflects hard to color pair of graphs. Because of this data generation paradigm GNN optimization objective becomes more difficult to reach and hopefully makes GNN more knowledgeable. Two datasets were generated CHROM_40_60 and CHROM_35_45 with 40 to 60 or 35 to 45 number of vertices in graph instance respectively and with 3 to 8 chromatic numbers both. Instances of CHROM_35_45 dataset are supposed to be easier to color than CHROM_40_60 ones. GNN was trained using that data and compared to heuristics: 43 tabucol and greedy. Percentage of correctly predicted graphs chromatic numbers were taken as a comparison metric. Testing on CHROM_40_60 and CHROM_35_45 datasets showed that GNN have slightly better accuracy metric than tabucol: GNN correctly predict 69 % and 77 % of graph chromatic numbers, when tabucol correctly predict 66 % and 76 % of graph chromatic numbers, greedy is far behind. To test GNN generalization ability cross dataset experiments were performed, GNN trained on CHROM_40_60 dataset is validated on CHROM_35_45 dataset and vice versa. These experiments show that model trained on CHROM_40_60 harder instances show decent accuracy on CHROM_35_45 easier instances while model trained on CHROM_35_45 easier instances perform weaker on CHROM_40_60 hard instances but still keeps some accuracy hence we can say that model has an ability to generalize to graphs with other number of vertices. Testing on natural instances of COLOR02/03/04 dataset which instances differ a lot from generated train/test data was performed. GNN trained on CHROM_40_60 shows accuracy similar to tabucol and much better than greedy. GNN behaves unstable on instances with chromatic number higher that was seen in training dataset.

Еще

Список литературы Нахождение хроматического числа графа с помощью методов глубокого обучения

  • Silver D., Schrittwieser J., Simonvan К., Antonoglou I., Huang A., Guez A. et al. Mastering the game of go without human knowledge // Nature. 2017. Vol. 550, N 7676, P. 354.
  • Selsam D., Lamm M., Bunz В., Liang P., de Moura L., and Dill D. Learning a sat solver from single-bit supervision, arXiv preprint arXiv:1802.03685, 2018.
  • Chaitanva К Joshi, Thomas Laurent, and Xavier Bresson. 2019. An efficient graph convolutional network technique for the travelling salesman problem. arXiv preprint arXiv:1906.01227 (2019).
  • Scarselli F., Gori M., Tsoi A., Hagenbuchner M., and Monfardini G. The graph neural network model // IEEE Tran. Neural Networks. 2009. Vol. 20, N 1, P. 61-80.
  • Barnier N. and Brisset P. Graph coloring for air traffic flow management // Annals of Operations Research. Aug 2004. Vol. 130, N 1, P. 163-178.
  • Thevenin S., Zufferev N., and Potvin J. Graph multi-coloring for a job scheduling application // Discrete App. Math., 2018. Vol. 234, P. 218-235.
  • Chen W., Lueh G., Ashar P., Chen K., and Cheng B. Register allocation for intel processor graphics. In CGO 2018, P. 352-364. [Electron. Res.]: http://doi.acm.org/10.1145/3168806.
  • Henrique Lemos, Marcelo Prates, Pedro Avelar, and Luis Lamb. Graph colouring meets deep learning: Effective graph neural network models for combinatorial problems //In IEEE International Conference on Tools with Artificial Intelligence (ICTAI). 2019. P. 879-885.
  • [Electron. Res.]: https://mat.tepper.cmu.edu/C0L0R02/.
  • Sepp Hochreiter, Jurgen Schmidhuber. LONG SHORT-TERM MEMORY // Neural Computation. 1997. N 9 8. P. 1735-1780, [Electron. Res.]: https://www.bioinf.jku.at/ publications/older/2604.pdf.
  • Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. 2016. Layer normalization. arXiv, abs/1607.06450.
  • Hertz A. and de Werra D. Using tabu search techniques for graph coloring // Computing. Dec. 1987. Vol. 39, N 4, R 345-351. [Electron. Res.]: http://dx.doi.org/10.1007/BF02239976.
Еще