Learning Fast Monomial Orders for Gröbner Basis Computations
R. Caleb Bunch, Alperen A. Ergür, Melika Golestani, Jessie Tong, Malia Walewski, Yunus E. Zeytuncu
TL;DR
This work tackles the problem of selecting effective monomial orderings for Gröbner basis computations by casting it as a stationary reinforcement learning task. Using a domain-informed reward based on F4 trace statistics and a Julia-based training loop, the authors demonstrate that learned policies consistently outperform GrevLex (and often GrevLex vs GrLex baselines) across diverse zero-dimensional polynomial systems from systems biology and computer vision, achieving substantial runtime reductions. Distillation attempts reveal that the optimal strategies exploit intricate, high-dimensional geometry of the Gröbner fan and are not readily captured by simple symbolic or shallow interpretable models, underscoring the value of deep RL for symbolic computation. The work further suggests promising directions, such as graph neural networks for cross-family generalization and interpretable-by-design architectures, to bridge performance gains with interpretability and broader applicability.
Abstract
The efficiency of Gröbner basis computation, the standard engine for solving systems of polynomial equations, depends on the choice of monomial ordering. Despite a near-continuum of possible monomial orders, most implementations rely on static heuristics such as GrevLex, guided primarily by expert intuition. We address this gap by casting the selection of monomial orderings as a reinforcement learning problem over the space of admissible orderings. Our approach leverages domain-informed reward signals that accurately reflect the computational cost of Gröbner basis computations and admits efficient Monte Carlo estimation. Experiments on benchmark problems from systems biology and computer vision show that the resulting learned policies consistently outperform standard heuristics, yielding substantial reductions in computational cost. Moreover, we find that these policies resist distillation into simple interpretable models, providing empirical evidence that deep reinforcement learning allows the agents to exploit non-linear geometric structure beyond the scope of traditional heuristics.
