Efficient Data Structures for Representation of Polynomial Optimization Problems: Implementation in SOSTOOLS

Declan Jagt, Sachin Shivakumar, Peter Seiler, Matthew M. Peet

TL;DR

Researchers have introduced a new data structure called dpvar for the SOSTOOLS optimization suite that drastically reduces the "parsing" time required to set up Sum-of-Squares (SOS) programs. By exploiting the fact that decision variables enter these problems linearly, the new structure achieves speedups of over 100x, turning parsing tasks that previously took hours into seconds and enabling the solution of much larger-scale nonlinear control problems.

What Problem Does This Paper Address?

Polynomial optimization is a cornerstone of modern nonlinear systems analysis and control. Because checking if a polynomial is always non-negative is a notoriously "hard" (NP-hard) problem, engineers use a shortcut: they check if the polynomial can be written as a Sum-of-Squares (SOS). This converts the original problem into a Semidefinite Program (SDP), which can be solved efficiently.

However, there is a hidden bottleneck. The process has two stages: parsing (converting the human-readable polynomial model into a computer-friendly SDP matrix) and solving (the actual numerical optimization). For large problems, parsing often takes more than 90% of the total execution time.

The culprit is how current tools represent variables. Existing parsers treat "decision variables" (the values we want to find) and "independent variables" (like time or spatial coordinates) as the same type of object. This leads to a combinatorial explosion in the number of terms the computer must track, making large-scale problems computationally "unsolvable" not because the math is too hard, but because the bookkeeping is too slow.

Methods

The authors introduce the dpvar (decision polynomial variable) data structure.

The key mathematical insight is that in any SOS program, the polynomial $s(x; \xi)$ is complex in its independent variables ($x$), but it is always affine (linear + a constant) in its decision variables ($\xi$).

Instead of mixing these variables together, dpvar represents the polynomial as a matrix product: $$s(x; \xi) = \begin{bmatrix} 1 \\ \xi \end{bmatrix}^T C Z_d(x)$$ Where:

  • $\xi$ is the vector of decision variables.
  • $Z_d(x)$ is a vector of monomials in the independent variables.
  • $C$ is a coefficient matrix.

By separating the decision variables into their own linear vector, operations like addition, multiplication (by a known polynomial), and differentiation only require manipulating the $C$ matrix or the $Z_d(x)$ vector. This allows the parser to use MATLAB’s highly optimized Compressed Sparse Column (CSC) matrix format, which minimizes memory usage and speeds up calculations.

Datasets

The authors evaluated their implementation using three classic polynomial optimization benchmarks:

  1. Greatest Lower Bound (GLB): Finding the minimum value of a complex 2D polynomial.
  2. Robust Stability: Testing the stability of a linear system with uncertain parameters.
  3. Local Stability: Analyzing a chain of $n$ Van der Pol oscillators (a standard benchmark for nonlinear dynamics).

They compared the performance of the new SOSTOOLS 4.00 (using dpvar) against SOSTOOLS 3.04 (using older pvar and syms structures) and the popular YALMIP parser.

Key Insights and Ideas

  • Structure is Everything: The "aha moment" is realizing that treating decision variables as general polynomials is a waste of resources. By enforcing the affine structure at the data-structure level, the complexity of many operations becomes nearly independent of the number of decision variables.
  • Exploiting MATLAB's Strengths: The dpvar structure is specifically designed to play to the strengths of MATLAB’s sparse matrix handling. By keeping the number of columns in the coefficient matrices small, they ensure that "merging" polynomials (a common task in parsing) remains extremely fast.
  • The Parsing Paradox: The paper highlights a growing discrepancy in the field: as SDP solvers get faster, the relative cost of parsing gets higher. This work bridges that gap, ensuring the "setup" doesn't outpace the "solve."

Key Results

  • Massive Speedups: In the GLB test, the dpvar structure reduced parsing time by a factor of approximately 100x ($10^2$) compared to older SOSTOOLS versions.
  • Scaling to New Heights: In the Robust Stability test, the dpvar structure parsed a problem with $n=50$ variables in just 374 seconds. For comparison, the YALMIP parser timed out (exceeded 3600 seconds) at only $n=13$.
  • Efficiency Gains: In many tests, the time spent parsing dropped from over 90% of the total run time to less than 20%, making the overall workflow much more balanced.
  • Memory Footprint: The memory required to store the "degrees" of the monomials was reduced by nearly 3x in representative examples.

Limitations and Future Work

The authors note that while dpvar is highly efficient for standard SOS programs, its benefits are tied to the linearity of the decision variables. If a user were to attempt a non-standard optimization where decision variables entered non-linearly, this specific structure would not apply.

Future work involves further refining the sosquadvar function—a new addition to SOSTOOLS 4.00 that allows for even more efficient handling of coupled positivity constraints across multiple polynomial variables. There is also potential to adapt these data structures for use in other programming environments beyond MATLAB, such as Python or Julia.

Summary updated

BibTeX
@inproceedings{jagt2022efficient,
  author = {Declan Jagt and Sachin Shivakumar and Peter Seiler and Matthew M. Peet},
  title = {{Efficient Data Structures for Representation of Polynomial Optimization Problems: Implementation in SOSTOOLS}},
  booktitle = {IEEE Control. Syst. Lett},
  year = {2022},
  url = {https://openreview.net/forum?id=cyCOw2KYS4GC},
}
Figure