Online Stability Improvement of Groebner Basis Solvers using Deep Learning

Wanting Xu,Lan Hu,Manolis C. Tsakiris,Laurent Kneip
2024-01-18
Abstract:Over the past decade, the Gröbner basis theory and automatic solver generation have lead to a large number of solutions to geometric vision problems. In practically all cases, the derived solvers apply a fixed elimination template to calculate the Gröbner basis and thereby identify the zero-dimensional variety of the original polynomial constraints. However, it is clear that different variable or monomial orderings lead to different elimination templates, and we show that they may present a large variability in accuracy for a certain instance of a problem. The present paper has two contributions. We first show that for a common class of problems in geometric vision, variable reordering simply translates into a permutation of the columns of the initial coefficient matrix, and that -- as a result -- one and the same elimination template can be reused in different ways, each one leading to potentially different accuracy. We then prove that the original set of coefficients may contain sufficient information to train a classifier for online selection of a good solver, most notably at the cost of only a small computational overhead. We demonstrate wide applicability at the hand of generic dense polynomial problem solvers, as well as a concrete solver from geometric vision.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: in geometric vision problems, the stability and accuracy of the Gröbner - basis solver are greatly affected by the ordering of variables or monomials, and different orderings may lead to significant differences in numerical stability. The traditional approach is to select a fixed elimination template in the offline phase, which limits the flexibility and robustness of the solver. This paper makes two main contributions: 1. **The impact of variable rearrangement**: The author proves that simple variable rearrangement can significantly affect the stability and accuracy of the solver, and for a large class of common polynomial problems (including dense polynomial systems), variable rearrangement is equivalent to the permutation of columns of the initial coefficient matrix, so the same elimination template can be reused in different ways, and each way may lead to different accuracies. 2. **Online selection of appropriate elimination templates**: The author proposes a deep - learning - based method. By training a classifier to predict the best elimination template, the most suitable solver can be selected online. This classifier only requires a very small computational overhead, but can significantly improve the stability and accuracy of the solver. Specifically, the main innovation points of the paper are: - **The mathematical basis of variable rearrangement**: By analyzing the impact of variable rearrangement on polynomial systems, the author proves that in some cases, variable rearrangement can be transformed into the permutation of columns of the coefficient matrix, thus allowing the same elimination template to be used for solving in different ways. - **The design and training of the deep - learning classifier**: The author designs a four - layer neural network. The input is the coefficient vector of the polynomial, and the output is the score of each possible permutation. Through synthetic data generation and training, this classifier can quickly select the optimal permutation in the online phase, thus improving the performance of the solver. The paper verifies the effectiveness of the method through multiple experiments, including general - purpose dense polynomial system solvers and specific geometric vision problem solvers. The results show that using a deep - learning classifier to select the optimal permutation can significantly improve the numerical stability and accuracy of the solver.