Guiding Word Equation Solving using Graph Neural Networks (Extended Technical Report)

Parosh Aziz Abdulla,Mohamed Faouzi Atig,Julie Cailler,Chencheng Liang,Philipp Rümmer
2024-11-19
Abstract:This paper proposes a Graph Neural Network-guided algorithm for solving word equations, based on the well-known Nielsen transformation for splitting equations. The algorithm iteratively rewrites the first terms of each side of an equation, giving rise to a tree-like search space. The choice of path at each split point of the tree significantly impacts solving time, motivating the use of Graph Neural Networks (GNNs) for efficient split decision-making. Split decisions are encoded as multi-classification tasks, and five graph representations of word equations are introduced to encode their structural information for GNNs. The algorithm is implemented as a solver named DragonLi. Experiments are conducted on artificial and real-world benchmarks. The algorithm performs particularly well on satisfiable problems. For single word \mbox{equations}, DragonLi can solve significantly more problems than well-established string solvers. For the conjunction of multiple word equations, DragonLi is competitive with state-of-the-art string solvers.
Machine Learning,Artificial Intelligence,Computation and Language,Logic in Computer Science
What problem does this paper attempt to address?
The core problem that this paper attempts to solve is to improve the efficiency and effectiveness of solving word equations. Specifically, the author proposes an algorithm based on Graph Neural Networks (GNNs) to guide the solving process of word equations, especially by optimizing split decision - making to reduce the solving time. ### Problem Background Word equations are an important problem in string theory, which involves finding string values that make both sides of the equation equal in a free semigroup. Although Makanin's work proved the decidability of the word equation problem and was later proven to belong to the PSPACE complexity class, existing SMT solvers still have limitations when dealing with word equations, especially in proving unsatisfiability. ### Solution Proposed in the Paper To solve the above problems, the author introduced a GNN - based heuristic method to guide the selection of the split algorithm. The split algorithm is based on the well - known Nielsen transformation and generates a tree - like search space by iteratively rewriting the first few terms of the equation. The path chosen for each split point in the tree has a significant impact on the solving time, so the author uses GNNs to make efficient split decisions. ### Specific Methods 1. **Graph Representation**: The author proposes five different graph representation methods to encode the structural information of word equations so that GNNs can read and process this information. 2. **Training Phase**: In the training phase, the split algorithm without GNN guidance is used to solve word equation problems from the training data set and generate the corresponding proof trees. Based on the information of these trees, each branch is assigned a label indicating whether it is a favorable choice. 3. **Prediction Phase**: In the prediction phase, the trained GNN model is used to guide the selection of the split algorithm. At each split point, the current branch is first converted into a graph representation and then input into the trained deep - learning model, and the model outputs the branch to be preferentially explored. ### Experimental Results The author implemented this algorithm and conducted extensive experimental evaluations. The results show that on the satisfiability problem (SAT), the split algorithm with GNN guidance significantly outperforms other existing solvers. In particular, in a specific benchmark test, the GNN - guided version of DragonLi solved 115% more SAT problems than the non - GNN - guided version and 43.0% more than the second - best solver, Woorpje. ### Summary The main contributions of this paper include: - Proposing a proof system based on the split algorithm, combining symbolic reasoning and GNN guidance. - Introducing an algorithm that integrates GNN guidance with the proof system. - Proposing five possible graph representation methods for word equations. - Conducting extensive experimental evaluations and comparing the effects of different graph encodings and backtracking strategies. Through these methods, the paper successfully improves the efficiency and accuracy of word equation solving, especially performing well on the satisfiability problem.