# Learning Fast Monomial Orders for Gr"obner Basis Computations

arXiv: https://arxiv.org/abs/2602.02972 · HTML: https://mlsanity.com/paper/2602.02972/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Placed in RL theory and sample complexity, one of 15 directions in Deep reinforcement learning methods.
- Builds on 15 of its 50 references that are in the map.
- First posted on arXiv 3 Feb 2026.

## Placed in

- Deep reinforcement learning methods / [RL theory and sample complexity](https://mlsanity.com/deeprl/rl-theory-and-sample-complexity/)

## Builds on (most cited first, 15 of 15)

- [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://mlsanity.com/paper/2402.03300/) (2024)
- [Gaussian Error Linear Units (GELUs)](https://mlsanity.com/paper/1606.08415/) (2016)
- [Addressing Function Approximation Error in Actor-Critic Methods](https://mlsanity.com/paper/1802.09477/) (2018)
- [Prioritized Experience Replay](https://mlsanity.com/paper/1511.05952/) (2015)
- [Discovering Symbolic Models from Deep Learning with Inductive Biases](https://mlsanity.com/paper/2006.11287/) (2020)
- [Beyond Gr"obner Bases: Basis Selection for Minimal Solvers](https://mlsanity.com/paper/1803.04360/) (2018)
- [Learning selection strategies in Buchberger's algorithm](https://mlsanity.com/paper/2005.01917/) (2020)
- [Applying machine learning to the problem of choosing a heuristic to select the variable ordering for cylindrical algebraic decomposition](https://mlsanity.com/paper/1404.6369/) (2014)
- [Learning to Compute Gr"obner Bases](https://mlsanity.com/paper/2311.12904/) (2023)
- [An Atlas for the Pinhole Camera](https://mlsanity.com/paper/2206.13468/) (2022)
- [Distill2Explain: Differentiable decision trees for explainable reinforcement learning in energy application controllers](https://mlsanity.com/paper/2403.11907/) (2024)
- [Using Machine Learning to Decide When to Precondition Cylindrical Algebraic Decomposition With Groebner Bases](https://mlsanity.com/paper/1608.04219/) (2016)
- [Geometric Generality of Transformer-Based Gr"obner Basis Computation](https://mlsanity.com/paper/2504.12465/) (2025)
- [Markov bases: a 25 year update](https://mlsanity.com/paper/2306.06270/) (2023)
- [Predicting the cardinality and maximum degree of a reduced Gr"obner basis](https://mlsanity.com/paper/2302.05364/) (2023)

## Abstract (arXiv)

The efficiency of Gr"obner 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"obner 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.
