{"type":"ScholarlyArticle","title":"One Model, Any CSP: Graph Neural Networks as Fast Global Search Heuristics for Constraint Satisfaction","authors":[{"name":"Jan Tönshoff","slug":"jan-tonshoff","given":"Jan","family":"Tönshoff","affiliation":"RWTH Aachen University"},{"name":"Berke Kisin","slug":"berke-kisin","given":"Berke","family":"Kisin","affiliation":"RWTH Aachen University"},{"name":"Jakob Lindner","slug":"jakob-lindner","given":"Jakob","family":"Lindner","affiliation":"RWTH Aachen University"},{"name":"Martin Grohe","slug":"martin-grohe","given":"Martin","family":"Grohe","affiliation":"RWTH Aachen University"}],"abstract":"We propose a universal Graph Neural Network architecture which can be trained as an end-2-end search heuristic for any Constraint Satisfaction Problem (CSP). Our architecture can be trained unsupervised with policy gradient descent to generate problem specific heuristics for any CSP in a purely data driven manner. \r\nThe approach is based on a novel graph representation for CSPs that is both generic and compact and enables us to process every possible CSP instance with one GNN, regardless of constraint arity, relations or domain size. Unlike previous RL-based methods, we operate on a global search action space and allow our GNN to modify any number of variables in every step of the stochastic search. This enables our method to properly leverage the inherent parallelism of GNNs. \r\nWe perform a thorough empirical evaluation where we learn heuristics for well known and important CSPs, both decision and optimisation problems, from random data, including graph coloring, MAXCUT, and MAX-k-SAT, and the general RB model. Our approach significantly outperforms prior end-2-end approaches for neural combinatorial optimization. It can compete with conventional heuristics and solvers on test instances that are several orders of magnitude larger and structurally more complex than those seen during training.","doi":"10.24963/ijcai.2023/476","url":"https://ijcai.org/proceedings/2023/476","pdf":"https://ijcai.org/proceedings/2023/0476.pdf","markdown":"https://ijcai.org/proceedings/2023/476.md","bibtex":"https://ijcai.org/proceedings/2023/bibtex/476","volume":{"slug":"2023","title":"Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2023","url":"https://ijcai.org/proceedings/2023/","year":2023,"location":"Macao, SAR","dates":"19-25 August 2023","editors":"Edith Elkind","isbn":"978-1-956792-03-4","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2023"},"section":"Machine Learning","track":"Main Track","number":476,"pages":{"first":4280,"last":4288},"keywords":["Constraint Satisfaction and Optimization: CSO: Constraint satisfaction","Machine Learning: ML: Sequence and graph learning","Machine Learning: ML: Reinforcement learning"],"videos":[],"references":[{"position":1,"raw":"[Amizadeh et al., 2019] Saeed Amizadeh, Sergiy Matu- sevych, and Markus Weimer. Pdp: A general neural frame- work for learning constraint satisfaction solvers. arXiv preprint arXiv:1903.01969, 2019.","title":"Pdp: A general neural framework for learning constraint satisfaction solvers","authors":"Saeed Amizadeh, Sergiy Matusevych, Markus Weimer","year":"2019","venue":null,"doi":null,"url":null,"internal_url":null},{"position":2,"raw":"[Audemard et al., 2020] Gilles Audemard, Frédéric Bousse- mart, Christophe Lecoutre, Cédric Piette, and Olivier Rous- sel. Xcsp3 and its ecosystem. Constraints, 25(1):47-69, 2020.","title":"Xcsp3 and its ecosystem","authors":"Gilles Audemard, Frédéric Boussemart, Christophe Lecoutre, Cédric Piette, Olivier Roussel","year":"2020","venue":"Constraints","doi":null,"url":null,"internal_url":null},{"position":3,"raw":"[Audemard et al., 2022] Gilles Audemard, Christophe Lecoutre, and Emmanuel Lonca, editors. XCSP3 Com- petition 2022 Proceedings, XCSP3 Competition, Artois, France, 2022. [","title":"XCSP3 Competition 2022 Proceedings, XCSP3 Competition","authors":null,"year":"2022","venue":null,"doi":null,"url":null,"internal_url":null},{"position":4,"raw":"[Audemard, 2018] Gilles Audemard. Cosoco 1.12. In XCSP3 Competition 2018 Proceedings, XCSP3 Competition, pages 78-79, 2018.","title":"Gilles Audemard. Cosoco 1.12","authors":"Audemard","year":"2018","venue":"XCSP3 Competition 2018 Proceedings, XCSP3 Competition","doi":null,"url":null,"internal_url":null},{"position":5,"raw":"[Balint and Schöning, 2018] Adrian Balint and Uwe Schön- ing. probsat. In Proceedings of SAT Competition 2018: Solver and Benchmark Descriptions. Department of Com- puter Science, University of Helsinki, 2018.","title":"probsat","authors":"Adrian Balint, Uwe Schöning","year":"2018","venue":"Proceedings of SAT Competition 2018: Solver and Benchmark Descriptions","doi":null,"url":null,"internal_url":null},{"position":6,"raw":"[Barrett et al., 2020] Thomas Barrett, William Clements, Jakob Foerster, and Alex Lvovsky. Exploratory combi- natorial optimization with reinforcement learning. In Pro- ceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 3243-3250, 2020.","title":"Exploratory combinatorial optimization with reinforcement learning","authors":"Thomas Barrett, William Clements, Jakob Foerster, Alex Lvovsky","year":"2020","venue":"Proceedings of the AAAI Conference on Artificial Intelligence","doi":null,"url":null,"internal_url":null},{"position":7,"raw":"[Barrett et al., 2022] Thomas D Barrett, Christopher WF Par- sonson, and Alexandre Laterre. Learning to solve combina- torial graph partitioning problems via efficient exploration. arXiv preprint arXiv:2205.14105, 2022.","title":"Learning to solve combinatorial graph partitioning problems via efficient exploration","authors":"Christopher Thomas D Barrett, Alexandre Wf Parsonson, Laterre","year":"2022","venue":null,"doi":null,"url":null,"internal_url":null},{"position":8,"raw":"[Bello et al., 2016] Irwan Bello, Hieu Pham, Quoc V Le, Mo- hammad Norouzi, and Samy Bengio. Neural combinatorial optimization with reinforcement learning. arXiv preprint arXiv:1611.09940, 2016.","title":"Neural combinatorial optimization with reinforcement learning","authors":"Irwan Bello, Hieu Pham, V Quoc, Mohammad Le, Samy Norouzi, Bengio","year":"2016","venue":null,"doi":null,"url":null,"internal_url":null},{"position":9,"raw":"[Benlic and Hao, 2013] Una Benlic and Jin-Kao Hao. Break- out local search for the max-cutproblem. Engineering Appli- cations of Artificial Intelligence, 26(3):1162 -1173, 2013.","title":"Una Benlic and Jin-Kao Hao. Breakout local search for the max-cutproblem","authors":"Hao Benlic","year":"2013","venue":"Engineering Applications of Artificial Intelligence","doi":null,"url":null,"internal_url":null},{"position":10,"raw":"[Biere et al., 2021] A. Biere, M. Heule, H. Van Maaren, and T. Walsh. Handbook of Satisfiability. IOS Press, 2nd edition, 2021.","title":"Handbook of Satisfiability","authors":"A Biere, M Heule, H Van Maaren, T Walsh","year":"2021","venue":null,"doi":null,"url":null,"internal_url":null},{"position":11,"raw":"[Brélaz, 1979] Daniel Brélaz. New methods to color the ver- tices of a graph. Communications of the ACM, 22(4):251- 256, 1979.","title":"New methods to color the vertices of a graph","authors":"Daniel Brélaz, Brélaz","year":"1979","venue":"Communications of the ACM","doi":null,"url":null,"internal_url":null},{"position":12,"raw":"[Cai and Lei, 2020] Shaowei Cai and Zhendong Lei. Old techniques in new ways: Clause weighting, unit propaga- tion and hybridization for maximum satisfiability. Artificial Intelligence, 287:103354, 2020.","title":"Old techniques in new ways: Clause weighting, unit propagation and hybridization for maximum satisfiability","authors":"Lei ; ] Shaowei Cai, Zhendong Cai, Lei","year":"2020","venue":"Artificial Intelligence","doi":null,"url":null,"internal_url":null},{"position":13,"raw":"[Cappart et al., 2021] Quentin Cappart, Didier Chételat, Elias B. Khalil, Andrea Lodi, Christopher Morris, and Petar Veličković. Combinatorial optimization and reason- ing with graph neural networks. In Zhi-Hua Zhou, editor, Proceedings of the Thirtieth International Joint Confer- ence on Artificial Intelligence, IJCAI-21, pages 4348-4355. International Joint Conferences on Artificial Intelligence Organization, 8 2021. Survey Track. [Galinier and Hao, 1999] Philippe Galinier and Jin-Kao Hao. Hybrid evolutionary algorithms for graph coloring. Journal of combinatorial optimization, 3(4):379-397, 1999.","title":"Combinatorial optimization and reasoning with graph neural networks","authors":"Quentin Cappart, Didier Chételat, Elias B Khalil, Andrea Lodi, Christopher Morris, Petar Veličković","year":"1999","venue":"Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21","doi":null,"url":null,"internal_url":"/proceedings/2021/595"},{"position":14,"raw":"[Gasse et al., 2019] Maxime Gasse, Didier Chetelat, Nicola Ferroni, Laurent Charlin, and Andrea Lodi. Exact com- binatorial optimization with graph convolutional neural networks. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32.","title":"Exact combinatorial optimization with graph convolutional neural networks","authors":"Maxime Gasse, Didier Chetelat, Nicola Ferroni, Laurent Charlin, Andrea Lodi","year":null,"venue":"Advances in Neural Information Processing Systems","doi":null,"url":null,"internal_url":null},{"position":15,"raw":"Curran Associates, Inc., 2019.","title":null,"authors":"Curran Associates, Inc","year":"2019","venue":null,"doi":null,"url":null,"internal_url":null},{"position":16,"raw":"[Gilmer et al., 2017] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning- Volume 70, pages 1263-1272. JMLR. org, 2017.","title":"Neural message passing for quantum chemistry","authors":"Justin Gilmer, S Samuel, Patrick F Schoenholz, Oriol Riley, George E Vinyals, Dahl","year":"2017","venue":"Proceedings of the 34th International Conference on Machine Learning","doi":null,"url":null,"internal_url":null},{"position":17,"raw":"[Goemans and Williamson, 1995] Michel X Goemans and David P Williamson. Improved approximation algo- rithms for maximum cut and satisfiability problems using semidefinite programming. Journal of the ACM (JACM), 42(6):1115-1145, 1995.","title":"Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming","authors":"X Michel, David P Goemans, Williamson","year":"1995","venue":"Journal of the ACM (JACM)","doi":null,"url":null,"internal_url":null},{"position":18,"raw":"[Joshi et al., 2020] Chaitanya K. Joshi, Quentin Cappart, Louis-Martin Rousseau, Thomas Laurent, and Xavier Bres- son. Learning TSP requires rethinking generalization. CoRR, abs/2006.07054, 2020.","title":"Learning TSP requires rethinking generalization","authors":"K Chaitanya, Quentin Joshi, Louis-Martin Cappart, Thomas Rousseau, Xavier Laurent, Bresson","year":"2020","venue":null,"doi":null,"url":null,"internal_url":null},{"position":19,"raw":"[Khalil et al., 2017] Elias Khalil, Hanjun Dai, Yuyu Zhang, Bistra Dilkina, and Le Song. Learning combinatorial op- timization algorithms over graphs. Advances in neural information processing systems, 30, 2017.","title":"Learning combinatorial optimization algorithms over graphs","authors":"Elias Khalil, Hanjun Dai, Yuyu Zhang, Bistra Dilkina, Le Song","year":"2017","venue":"Advances in neural information processing systems","doi":null,"url":null,"internal_url":null},{"position":20,"raw":"[Kool et al., 2018] Wouter Kool, Herke van Hoof, and Max Welling. Attention, learn to solve routing problems! In In- ternational Conference on Learning Representations, 2018.","title":"Attention, learn to solve routing problems!","authors":"Wouter Kool, Herke Van Hoof, Max Welling","year":"2018","venue":"ternational Conference on Learning Representations","doi":null,"url":null,"internal_url":null},{"position":21,"raw":"[Lecoutre, 2022] Christophe Lecoutre. Ace a generic con- straint solver. In XCSP3 Competition 2022 Proceedings, XCSP3 Competition, pages 58-59, 2022.","title":"Ace a generic constraint solver","authors":"Christophe Lecoutre","year":"2022","venue":"XCSP3 Competition 2022 Proceedings, XCSP3 Competition","doi":null,"url":null,"internal_url":null},{"position":22,"raw":"[Lewis et al., 2012] Rhyd Lewis, Jonathan Thompson, Chris- tine Mumford, and Jonathan Gillard. A wide-ranging computational comparison of high-performance graph colouring algorithms. Computers & Operations Research, 39(9):1933-1950, 2012.","title":"A wide-ranging computational comparison of high-performance graph colouring algorithms","authors":"Rhyd Lewis, Jonathan Thompson, Christine Mumford, Jonathan Gillard","year":"2012","venue":"Computers & Operations Research","doi":null,"url":null,"internal_url":null},{"position":23,"raw":"[Lewis, 2015] Rhyd Lewis. A guide to graph colouring, vol- ume 7. Springer, 2015.","title":"A guide to graph colouring","authors":"Rhyd Lewis","year":"2015","venue":null,"doi":null,"url":null,"internal_url":null},{"position":24,"raw":"[Luo et al., 2015] Chuan Luo, Shaowei Cai, Wei Wu, Zhong Jie, and Kaile Su. Ccls: An efficient local search algorithm for weighted maximum satisfiability. IEEE Transactions on Computers, 64(7):1830-1843, 2015.","title":"Ccls: An efficient local search algorithm for weighted maximum satisfiability","authors":"Chuan Luo, Shaowei Cai, Wei Wu, Zhong Jie, Kaile Su","year":"2015","venue":"IEEE Transactions on Computers","doi":null,"url":null,"internal_url":null},{"position":25,"raw":"[Mehta, 2019] Hermish Mehta. Cvx graph algorithms. https://github.com/hermish/cvx-graph-algorithms, 2019.","title":"Hermish Mehta. Cvx graph algorithms","authors":"Mehta","year":"2019","venue":null,"doi":null,"url":"https://github.com/hermish/cvx-graph-algorithms,2019","internal_url":null},{"position":26,"raw":"[Russell et al., 2020] S. Russell, S.J. Russell, P. Norvig, and E. Davis. Artificial Intelligence: A Modern Approach. Pren- tice Hall, 4th edition, 2020.","title":"Artificial Intelligence: A Modern Approach","authors":"S Russell, S J Russell, P Norvig, E Davis","year":"2020","venue":null,"doi":null,"url":null,"internal_url":null},{"position":27,"raw":"[Selman et al., 1993] Bart Selman, Henry A Kautz, Bram Co- hen, et al. Local search strategies for satisfiability testing. Cliques, coloring, and satisfiability, 26:521-532, 1993.","title":"Local search strategies for satisfiability testing","authors":"Bart Selman, Henry A Kautz, Bram Cohen","year":"1993","venue":"Cliques, coloring, and satisfiability","doi":null,"url":null,"internal_url":null},{"position":28,"raw":"[Selsam et al., 2018] Daniel Selsam, Matthew Lamm, Benedikt Bünz, Percy Liang, Leonardo de Moura, and David L Dill. Learning a sat solver from single-bit supervision. arXiv preprint arXiv:1802.03685, 2018.","title":"Learning a sat solver from single-bit supervision","authors":"Daniel Selsam, Matthew Lamm, Benedikt Bünz, Percy Liang, Leonardo De Moura, David L Dill","year":"2018","venue":null,"doi":null,"url":null,"internal_url":null},{"position":29,"raw":"[Tönshoff et al., 2021] Jan Tönshoff, Martin Ritzert, Hin- rikus Wolf, and Martin Grohe. Graph neural networks for maximum constraint satisfaction. Frontiers in Artificial Intelligence, 3, 2021.","title":"Graph neural networks for maximum constraint satisfaction","authors":"Tönshoff","year":"2021","venue":"Frontiers in Artificial Intelligence","doi":null,"url":null,"internal_url":null},{"position":30,"raw":"[Vinyals et al., 2015] Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. Advances in neural information processing systems, 28, 2015.","title":"Pointer networks","authors":"Oriol Vinyals, Meire Fortunato, Navdeep Jaitly","year":"2015","venue":"Advances in neural information processing systems","doi":null,"url":null,"internal_url":null},{"position":31,"raw":"[Wang et al., 2021] Runzhong Wang, Zhigang Hua, Gan Liu, Jiayi Zhang, Junchi Yan, Feng Qi, Shuang Yang, Jun Zhou, and Xiaokang Yang. A bi-level framework for learning to solve combinatorial optimization on graphs. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Pro- cessing Systems, volume 34, pages 21453-21466.","title":"A bi-level framework for learning to solve combinatorial optimization on graphs","authors":"Runzhong Wang, Zhigang Hua, Gan Liu, Jiayi Zhang, Junchi Yan, Feng Qi, Shuang Yang, Jun Zhou, Xiaokang Yang","year":null,"venue":"Advances in Neural Information Processing Systems","doi":null,"url":null,"internal_url":null},{"position":32,"raw":"Curran Associates, Inc., 2021.","title":null,"authors":"Curran Associates, Inc","year":"2021","venue":null,"doi":null,"url":null,"internal_url":null},{"position":33,"raw":"[Williams, 1992] Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforce- ment learning. Machine learning, 8(3):229-256, 1992.","title":"Simple statistical gradient-following algorithms for connectionist reinforcement learning","authors":"Williams Ronald","year":"1992","venue":"Machine learning","doi":null,"url":null,"internal_url":null},{"position":34,"raw":"[Xu and Li, 2003] Ke Xu and Wei Li. Many hard examples in exact phase transitions. Science Direct Working Paper No S1574-034X (04), pages 70228-8, 2003.","title":"Many hard examples in exact phase transitions","authors":"Ke Xu, Wei Li","year":"2003","venue":null,"doi":null,"url":null,"internal_url":null},{"position":35,"raw":"[Yao et al., 2021] Fan Yao, Renqin Cai, and Hongning Wang. Reversible action design for combinatorial optimization with reinforcement learning. In AAAI-22 Workshop on Ma- chine Learning for Operations Research (ML4OR), 2021.","title":"Reversible action design for combinatorial optimization with reinforcement learning","authors":"Fan Yao, Renqin Cai, Hongning Wang","year":"2021","venue":"AAAI-22 Workshop on Machine Learning for Operations Research (ML4OR)","doi":null,"url":null,"internal_url":null},{"position":36,"raw":"[Ye, 2003] Yinyu Ye. Gset. https://web.stanford.edu/~yyye/yyye/Gset/, 2003.","title":"Yinyu Ye. Gset","authors":"Ye","year":"2003","venue":null,"doi":null,"url":"https://web.stanford.edu/~yyye/yyye/Gset/,2003","internal_url":null},{"position":37,"raw":"[Yolcu and Póczos, 2019] Emre Yolcu and Barnabás Póczos. Learning local search heuristics for boolean satisfiability. Advances in Neural Information Processing Systems, 32, 2019.","title":"Learning local search heuristics for boolean satisfiability","authors":"Emre Yolcu, Barnabás Póczos","year":"2019","venue":"Advances in Neural Information Processing Systems","doi":null,"url":null,"internal_url":null},{"position":38,"raw":"[Zhang et al., 2020] Wenjie Zhang, Zeyu Sun, Qihao Zhu, Ge Li, Shaowei Cai, Yingfei Xiong, and Lu Zhang. Nlocal- sat: Boosting local search with solution prediction. arXiv preprint arXiv:2001.09398, 2020.","title":"Nlocalsat: Boosting local search with solution prediction","authors":"Wenjie Zhang, Zeyu Sun, Qihao Zhu, Ge Li, Shaowei Cai, Yingfei Xiong, Lu Zhang","year":"2020","venue":null,"doi":null,"url":null,"internal_url":"/proceedings/2020/164"},{"position":39,"raw":"[Zhou, 2022] Neng-Fa Zhou. An xcsp3 solver in picat. In XCSP3 Competition 2022 Proceedings, XCSP3 Competi- tion, pages 79-81, 2022.","title":"An xcsp3 solver in picat","authors":"Neng-Fa Zhou","year":"2022","venue":"XCSP3 Competition 2022 Proceedings, XCSP3 Competition","doi":null,"url":null,"internal_url":null}],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}