| --- |
| license: mit |
| task_categories: |
| - graph-ml |
| --- |
| |
| # RandSATBench: Benchmarks for Constraint Satisfaction Problems |
|
|
| This repository contains the benchmarks presented in the paper [Benchmarking Graph Neural Networks in Solving Hard Constraint Satisfaction Problems](https://huggingface.co/papers/2602.18419). |
|
|
| **RandSATBench** provides a mixed set of easy, hard, and unsatisfiable instances of constraint satisfaction problems, specifically *q-coloring* and *Boolean satisfiability* (K-SAT) problems. The goal is to provide a challenging setting to compare the performance of deep learning methods (particularly Graph Neural Networks) against classical exact and heuristic solvers. |
|
|
| - **Paper:** [https://huggingface.co/papers/2602.18419](https://huggingface.co/papers/2602.18419) |
| - **Repository:** [https://github.com/ArtLabBocconi/RandCSPBench](https://github.com/ArtLabBocconi/RandCSPBench) |
|
|
| ## Datasets |
|
|
| The benchmark includes datasets for Boolean satisfiability (3-SAT and 4-SAT) and coloring problems (3-coloring and 5-coloring). The instances vary in size ($N=16, 32, 64, 256$) and connectivity. |
|
|
| | Dataset | # Train Instances | # Test Instances | |
| |---------|-------------------|------------------| |
| | 3-SAT | 168,000 | 42,000 | |
| | 4-SAT | 84,000 | 21,000 | |
| | 3-col | 60,000 | 20,000 | |
| | 5-col | 60,000 | 20,000 | |
|
|
| ## Usage |
|
|
| ### K-SAT |
|
|
| The random instances of 3-SAT or 5-SAT problems in CNF format can be downloaded using the following: |
|
|
| ```bash |
| wget https://huggingface.co/datasets/CarloLucibello/kSAT-Benchmarks/resolve/main/kSAT.zip |
| unzip kSAT.zip |
| ``` |
|
|
| Ground truth solutions obtained by running the CaDiCal solver are available in the corresponding `train_labels.csv` files. |
|
|
| ### q-coloring |
|
|
| To generate the random graphs for the 3-coloring and 5-coloring benchmarks, use the scripts provided in the GitHub repository: |
|
|
| ```bash |
| cd datasets |
| python gen_graphs_coloring.py |
| ``` |
|
|
| ## Citation |
|
|
| If you use this benchmark in your research, please cite: |
|
|
| ```bibtex |
| @article{lucibello2026benchmarking, |
| title={Benchmarking Graph Neural Networks in Solving Hard Constraint Satisfaction Problems}, |
| author={Lucibello, Carlo and others}, |
| journal={arXiv preprint arXiv:2602.18419}, |
| year={2026} |
| } |
| ``` |