Suggesting Variable Order for Cylindrical Algebraic Decomposition via Reinforcement Learning

Published: 21 Sept 2023, Last Modified: 04 Jan 2024NeurIPS 2023 posterEveryoneRevisionsBibTeX
Keywords: Reinforcement Learning, Graph Neural Network, Cylindrical Algebraic Decomposition.
TL;DR: This paper proposes two novel RL approaches combined with GNNs for Suggesting Variable Order for Cylindrical Algebraic Decomposition.
Abstract: Cylindrical Algebraic Decomposition (CAD) is one of the pillar algorithms of symbolic computation, and its worst-case complexity is double exponential to the number of variables. Researchers found that variable order dramatically affects efficiency and proposed various heuristics. The existing learning-based methods are all supervised learning methods that cannot cope with diverse polynomial sets. This paper proposes two Reinforcement Learning (RL) approaches combined with Graph Neural Networks (GNN) for Suggesting Variable Order (SVO). One is GRL-SVO(UP), a branching heuristic integrated with CAD. The other is GRL-SVO(NUP), a fast heuristic providing a total order directly. We generate a random dataset and collect a real-world dataset from SMT-LIB. The experiments show that our approaches outperform state-of-the-art learning-based heuristics and are competitive with the best expert-based heuristics. Interestingly, our models show a strong generalization ability, working well on various datasets even if they are only trained on a 3-var random dataset. The source code and data are available at
Submission Number: 10894