Learning dynamic polynomial proofs

Alhussein Fawzi, Mateusz Malinowski, Hamza Fawzi, Omar Fawzi

Proving that a polynomial is non-negative (e.g., $f(x) \geq 0$) is a cornerstone of mathematical optimization, robotics, and control theory. However, it is notoriously difficult. Researchers from DeepMind and the University of Cambridge have developed a deep reinforcement learning (RL) agent that can automatically discover "dynamic" proofs for polynomial inequalities. By learning to strategically apply inference rules rather than relying on massive, brute-force "static" hierarchies, the agent finds proofs that are several orders of magnitude smaller and more accurate than traditional methods.

The Curse of Dimensionality in Static Proofs

The standard approach to proving polynomial inequalities uses semi-algebraic proof systems, which provide rules to derive new inequalities from basic axioms. Currently, the gold standard for automation is to use static hierarchies (like the Sherali-Adams or Lasserre hierarchies). These methods "unroll" all possible inference rules up to a fixed degree and solve the resulting problem using convex optimization.

Unfortunately, static hierarchies suffer from a severe curse of dimensionality. To get a good proof, you often need to evaluate high degrees, causing the size of the underlying optimization problem to explode exponentially. Furthermore, these proofs are "static"—they do not adapt to the specific problem at hand, making them computationally inefficient and nearly impossible for humans to interpret.

A Reinforcement Learning Approach

To overcome these limitations, the authors treat proof-seeking as a sequential game and train a Prover Agent using Deep Reinforcement Learning (DQN).

  1. The Environment: The state consists of the target polynomial to be proved, a "memory" of previously derived lemmas (inequalities), and a set of known equalities.
  2. The Actions: At each step, the agent chooses an inference rule to apply, such as multiplying an existing inequality by $x_i$ or $1-x_i$.
  3. Unsupervised Reward: Instead of relying on human-written proofs for training data, the agent is rewarded based on how much it improves the "upper bound" of the optimization problem at each step.
  4. Symmetry-Aware Architecture: Polynomials are inherently symmetric; swapping the names of variables $x_1$ and $x_2$ does not change the underlying math. The authors designed a novel neural network architecture that is invariant to the order of lemmas in memory and the relabeling of variables. This crucial inductive bias allows the agent to generalize to new, unseen problems without having to "re-learn" the rules of algebra.

Key Insights and Ideas

The researchers evaluated their approach on the Maximum Stable Set problem, a classic NP-hard combinatorial problem. The agent was trained on randomly generated graphs with 25 nodes and tested on graphs ranging from 15 to 50 nodes to evaluate out-of-distribution generalization.

  • Dynamic > Static: A dynamic proof can be much "shallower" than a static one. The paper demonstrates that while a static proof might require a degree of $n$ (leading to an exponential number of variables), a dynamic proof can achieve the same result using only degree-2 polynomials by cleverly sequencing its steps.
  • Interpretable Math: Unlike the "black box" of a massive linear program, the agent produces a sequence of lemmas that a human mathematician can actually follow and verify.
An interpretable, step-by-step dynamic proof generated for a 7-node cycle graph.

Key Results

The dynamic prover significantly outperformed the standard Sherali-Adams static hierarchy across multiple dimensions:

  • Efficiency: For a graph with 50 nodes, the static hierarchy (at level $l=5$) required a Linear Program (LP) with over 2.6 million variables. The RL agent achieved a tighter bound using an LP of only 200 variables.
  • Accuracy: The bounds produced by the RL agent were consistently "tighter" (closer to the true mathematical answer) than those produced by the static hierarchy, even when the static hierarchy was given significantly more computational resources.
  • Generalization: Thanks to its symmetry-aware architecture, the agent successfully generalized to graphs twice the size of its training set and to different graph structures (like cycle graphs) without additional training.
Comparison of dynamic vs. static hierarchy performance and LP size across different graph sizes.

Limitations and Future Work

While highly effective, the current study limits the agent to a specific set of inference rules (Lovász-Schrijver/Sherali-Adams) and intermediate lemmas of degree 2. Additionally, while the resulting proofs are small and fast to solve, training the RL agent itself remains computationally intensive.

Looking forward, the authors suggest extending this framework to more powerful proof systems, such as Sum-of-Squares (SOS), which use semi-definite programming. This expansion could potentially allow the agent to tackle even more complex problems in non-linear optimization and physics.

Summary updated

BibTeX
@inproceedings{fawzi2019learning,
  author = {Alhussein Fawzi and Mateusz Malinowski and Hamza Fawzi and Omar Fawzi},
  title = {{Learning dynamic polynomial proofs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure