Graph Coloring - Weighted Vertex Coloring Problem

Overview

Graph Coloring - Weighted Vertex Coloring Problem

MIT License

This project proposes several local searches and an MCTS algorithm for the weighted vertex coloring problem (WVCP).

This problem is an variant of the Graph Coloring Problem. Given a weighted graph G=(V,E), the set of vertices V, the set of edges E and let W be the set of weights w(v) associated to each vertex v in V, the WVCP consists in finding a partition of the vertices V in into k color groups S=(V_1,...,Vk) (1 \leq k \leq |V|) such that no adjacent vertices belong to the same color group and such that the objective function f(S) = \sum_{i=1}^{k}\max_{v\in V_i}{w(v)} is minimized.

This project is coded in C++ for the calculation part and in Python for the data analysis. This work is related to the article :

Grelier, C., Goudet, O., Hao, J.-K., 2022. On Monte Carlo Tree Search for Weighted Vertex Coloring. arXiv:2202.01665 [cs]. https://arxiv.org/abs/2202.01665

Requirements

To compile this project you need :

  • cmake 3.14+
  • Doxygen (optional, to build the documentation)
  • Python (used with 3.8+ for the slurm job generators, data analysis and documentation)

Run the project

Clone the project

git clone https://github.com/Cyril-Grelier/gc_wvcp_mcts

Go to the project directory

cd gc_wvcp_mcts

Load the instances

git submodule init
git submodule update

Build and compile the project :

./scripts/build.sh

Run the project :

cd build
./gc_wvcp --help

Run with slurm

You can find a generator of “to_eval” file to run jobs with slurm or GNU parallel. Set the desired instances, random seed and different parameters in scripts/generator_to_eval_ls.py (for local search) or scripts/generator_to_eval_mcts.py (for mcts) and run the script with python (no particular packages are required) python scripts/generator_to_eval_mcts.py and it will generate output directory and a to_eval file which will contain each command line argument to run with slurm or GNU Parallel.

Create Python environment for data analysis or documentation

Make sure to create the environment for python and activate it before running scripts for data analysis or documentation :

./scripts/build_python.sh
source venv/bin/activate

Data analysis

scripts/generate_table.py takes raw data and convert it to xlsx files (in xlsx_files repertory) with colored best scores, p-value calculation.

Make sure to set all required methods, instances and output names directly in the script before running it.

Results

You can find the raw results in outputs from runs of the code on different instances on the cluster of Nantes : https://ccipl.univ-nantes.fr/ (nazare nodes). These files are in csv format with the header on the first line, followed by each improving solution found during the search (with the complete solution), the last line corresponds to the best solution found during the whole search with the number of iterations, the time,… at the end of the run. The processed data can be found in xlsx_files (files generated by scripts/generate_table.py script). In those files, the results are slightly different comparing to the results in the article as they have been computed on a different CPU but the tendency stay the same.

Documentation

You can generate the documentation by running :

cd docs
make html

The doc main page will be located in : docs/_build/html/index.html. It’s a basic documentation generated from comments in the code.

Acknowledgements

We would like to thank Dr. Wen Sun for sharing the binary code of their AFISA algorithm [1] (the AFISA algorithm have been reimplemented from the article, afisa_original), Dr. Yiyuan Wang for sharing the code of their RedLS algorithm [2] (the RedLS algorithm have been reimplemented from the article, redls) and Pr. Bruno Nogueira for sharing the code of their ILS-TS algorithm [3] (some part of the code have been used and adapted to the implementation of the project, ilsts).

Owner
Cyril
PHD student currently working on metaheuristic (soon) guided by deep learning to solve graph coloring problems.
Cyril
Textlesslib - Library for Textless Spoken Language Processing

textlesslib Textless NLP is an active area of research that aims to extend NLP t

Meta Research 379 Dec 27, 2022
Simple, hackable offline speech to text - using the VOSK-API.

Simple, hackable offline speech to text - using the VOSK-API.

Campbell Barton 844 Jan 07, 2023
Code for the Findings of NAACL 2022(Long Paper): AdapterBias: Parameter-efficient Token-dependent Representation Shift for Adapters in NLP Tasks

AdapterBias: Parameter-efficient Token-dependent Representation Shift for Adapters in NLP Tasks arXiv link: upcoming To be published in Findings of NA

Allen 16 Nov 12, 2022
Ongoing research training transformer language models at scale, including: BERT & GPT-2

What is this fork of Megatron-LM and Megatron-DeepSpeed This is a detached fork of https://github.com/microsoft/Megatron-DeepSpeed, which in itself is

BigScience Workshop 316 Jan 03, 2023
This is a modification of the OpenAI-CLIP repository of moein-shariatnia

This is a modification of the OpenAI-CLIP repository of moein-shariatnia

Sangwon Beak 2 Mar 04, 2022
Research code for the paper "Fine-tuning wav2vec2 for speaker recognition"

Fine-tuning wav2vec2 for speaker recognition This is the code used to run the experiments in https://arxiv.org/abs/2109.15053. Detailed logs of each t

Nik 103 Dec 26, 2022
Türkçe küfürlü içerikleri bulan bir yapay zeka kütüphanesi / An ML library for profanity detection in Turkish sentences

"Kötü söz sahibine aittir." -Anonim Nedir? sinkaf uygunsuz yorumların bulunmasını sağlayan bir python kütüphanesidir. Farkı nedir? Diğer algoritmalard

KaraGoz 4 Feb 18, 2022
Large-scale Knowledge Graph Construction with Prompting

Large-scale Knowledge Graph Construction with Prompting across tasks (predictive and generative), and modalities (language, image, vision + language, etc.)

ZJUNLP 161 Dec 28, 2022
Sinkhorn Transformer - Practical implementation of Sparse Sinkhorn Attention

Sinkhorn Transformer This is a reproduction of the work outlined in Sparse Sinkhorn Attention, with additional enhancements. It includes a parameteriz

Phil Wang 217 Nov 25, 2022
T‘rex Park is a Youzan sponsored project. Offering Chinese NLP and image models pretrained from E-commerce datasets

T‘rex Park is a Youzan sponsored project. Offering Chinese NLP and image models pretrained from E-commerce datasets (product titles, images, comments, etc.).

55 Nov 22, 2022
Trex is a tool to match semantically similar functions based on transfer learning.

Trex is a tool to match semantically similar functions based on transfer learning.

62 Dec 28, 2022
SciBERT is a BERT model trained on scientific text.

SciBERT is a BERT model trained on scientific text.

AI2 1.2k Dec 24, 2022
A library for end-to-end learning of embedding index and retrieval model

Poeem Poeem is a library for efficient approximate nearest neighbor (ANN) search, which has been widely adopted in industrial recommendation, advertis

54 Dec 21, 2022
Twitter bot that uses NLP models to summarize news articles referenced in a user's twitter timeline

Twitter-News-Summarizer Twitter bot that uses NLP models to summarize news articles referenced in a user's twitter timeline 1.) Extracts all tweets fr

Rohit Govindan 1 Jan 27, 2022
Bnagla hand written document digiiztion

Bnagla hand written document digiiztion This repo addresses the problem of digiizing hand written documents in Bangla. Documents have definite fields

Mushfiqur Rahman 1 Dec 10, 2021
Healthsea is a spaCy pipeline for analyzing user reviews of supplementary products for their effects on health.

Welcome to Healthsea ✨ Create better access to health with spaCy. Healthsea is a pipeline for analyzing user reviews to supplement products by extract

Explosion 75 Dec 19, 2022
A python framework to transform natural language questions to queries in a database query language.

__ _ _ _ ___ _ __ _ _ / _` | | | |/ _ \ '_ \| | | | | (_| | |_| | __/ |_) | |_| | \__, |\__,_|\___| .__/ \__, | |_| |_| |___/

Machinalis 1.2k Dec 18, 2022
Behavioral Testing of Clinical NLP Models

Behavioral Testing of Clinical NLP Models This repository contains code for testing the behavior of clinical prediction models based on patient letter

Betty van Aken 2 Sep 20, 2022
📜 GPT-2 Rhyming Limerick and Haiku models using data augmentation

Well-formed Limericks and Haikus with GPT2 📜 GPT-2 Rhyming Limerick and Haiku models using data augmentation In collaboration with Matthew Korahais &

Bardia Shahrestani 2 May 26, 2022
Utilizing RBERT model for KLUE Relation Extraction task

RBERT for Relation Extraction task for KLUE Project Description Relation Extraction task is one of the task of Korean Language Understanding Evaluatio

snoop2head 14 Nov 15, 2022