This paper introduces Neural Sum-of-Squares, a novel approach that combines deep learning with classical optimization to solve a notoriously difficult problem in mathematics and engineering: proving that a polynomial is always non-negative.
TL;DR
The authors present the first learning-augmented algorithm to certify polynomial non-negativity. By using a Transformer to predict a compact "monomial basis," this approach drastically reduces the size of the resulting optimization problems (SDPs). The method achieves speedups of over 100× and successfully solves high-dimensional problems that were previously computationally intractable.
What Problem Does This Paper Address?
Proving that a polynomial $p(x)$ is non-negative for all real $x$ is a fundamental, yet NP-hard, task in robotics, control theory, and non-convex optimization.
The standard workaround is the Sum-of-Squares (SOS) relaxation. If a polynomial can be written as a sum of squared polynomials ($p(x) = \sum h_i(x)^2$), it is guaranteed to be non-negative. Finding this decomposition involves solving a Semidefinite Program (SDP).
The primary bottleneck in this process is the monomial basis—the set of building blocks used to construct $h_i(x)$. The size of the SDP grows quadratically with the number of monomials in this basis. Traditional heuristic methods (like Newton Polytope pruning) often produce bases that are far larger than necessary, making the resulting SDPs too slow or memory-intensive for complex, high-degree, or high-variable polynomials.
Methods
To overcome this bottleneck, the authors propose a "learning-augmented" pipeline that replaces heuristic basis selection with a neural prediction.
- Transformer-Based Prediction: A Transformer model takes a tokenized polynomial as input and predicts a "near-minimal" monomial basis.
- Monomial Tokenization: Polynomials are converted into sequences where each term is represented by its coefficient and the exponents of its variables.
- Coverage Repair: Because neural networks can make mistakes, a "greedy repair" step is included. This algorithm checks if the predicted basis can theoretically represent all terms in the original polynomial and adds the most useful missing monomials if necessary.
- Iterative Expansion & Fallback: If the predicted basis fails to produce a valid SOS certificate, the algorithm iteratively expands the basis using a scoring mechanism based on multiple variable permutations. This fallback ensures mathematical correctness: if a certificate exists, the algorithm will eventually find it.
Datasets
Training a model for complex symbolic reasoning requires massive amounts of data. The authors generated a synthetic dataset of 100 million SOS polynomials using "reverse sampling"—starting with a known compact basis and generating a polynomial from it. The training data covers four distinct matrix structures (dense, sparse, block-diagonal, and low-rank) to ensure generalization, scaling up to 100 variables and degrees up to 40.
Key Insights
- The Scalability Bottleneck: The primary cost of SOS programming isn't the SDP solver itself, but the redundancy in the basis. Using a Transformer to guess the sparse structure drastically shrinks the optimization problem.
- Compositional Generalization: A model trained only on degree-12 polynomials successfully predicted bases for degree-20 polynomials, suggesting the Transformer learns the underlying "grammar" of monomial interactions.
- Permutation-Based Scoring: Polynomials are invariant to variable ordering, but Transformers are sensitive to sequence order. The authors run the model on several random permutations of the variables and aggregate the results to find the most stable basis.
Key Results
The Neural Sum-of-Squares approach demonstrates remarkable improvements over traditional methods:
- Massive Speedups: On benchmark datasets, the method achieved speedups of over 100× compared to standard Newton Polytope methods, with the performance gap widening significantly as the number of terms increases.
- Breaking the Dimensionality Barrier: The approach solved instances with 100 variables and degree 10 in under 60 seconds. State-of-the-art baseline solvers (like TSSOS or SoS.jl) either timed out or crashed due to out-of-memory errors on these exact same problems.
- Near-Minimal Bases: The predicted bases were often close to the theoretical lower bounds for basis size, proving the model successfully learned to identify the essential monomials.
Limitations and Future Work
While the synthetic data is diverse, the lack of large-scale, real-world SOS benchmarks remains a hurdle for evaluating performance on specific structural nuances found in real-world control problems. Additionally, like all Transformers, context length limits how many monomials the model can process at once. Future work may involve developing a more robust, order-invariant polynomial representation to remove the need for the multiple-permutation trick.
Summary updated