Streaming Semidefinite Programs: O(√n) Passes, Small Space and Fast Runtime

Zhao Song, Mingquan Ye, Lichen ZhangarXiv 2023 · OpenReview

Abstract

We study the problem of solving semidefinite programs (SDP) in the streaming model. Specifically, $m$ constraint matrices and a target matrix $C$, all of size $n\times n$ together with a vector $b\in \mathbb{R}^m$ are streamed to us one-by-one. The goal is to find a matrix $X\in \mathbb{R}^{n\times n}$ such that $\langle C, X\rangle$ is maximized, subject to $\langle A_i, X\rangle=b_i$ for all $i\in [m]$ and $X\succeq 0$. Previous algorithmic studies of SDP primarily focus on time-efficiency, and all of them require a prohibitively large $\Omega(mn^2)$ space in order to store all the constraints. Such space consumption is necessary for fast algorithms as it is the size of the input. In this work, we design an interior point method (IPM) that uses $\widetilde O(m^2+n^2)$ space, which is strictly sublinear in the regime $n\gg m$. Our algorithm takes $O(\sqrt n\log(1/\epsilon))$ passes, which is standard for IPM. Moreover, when $m$ is much smaller than $n$, our algorithm also matches the time complexity of the state-of-the-art SDP solvers. To achieve such a sublinear space bound, we design a novel sketching method that enables one to compute a spectral approximation to the Hessian matrix in $O(m^2)$ space. To the best of our knowledge, this is the first method that successfully applies sketching technique to improve SDP algorithm in terms of space (also time).

Introduction

Semidefinite Programming (SDP) is a fundamental tool in modern optimization, providing powerful frameworks for machine learning, robust statistics, and approximation algorithms for NP-hard problems. Despite their utility, SDPs face a significant "memory wall." A standard SDP involves $m$ constraint matrices, each of size $n \times n$. Traditional state-of-the-art solvers, particularly Interior Point Methods (IPMs), typically require $\Omega(mn^2)$ space to store these constraints. As $n$ (the dimension) and $m$ (the number of constraints) scale, this memory requirement often exceeds the capacity of modern RAM.

This paper addresses the challenge of solving SDPs in the streaming model, where constraints arrive sequentially. The central question is whether an SDP can be solved without storing all constraints simultaneously, maintaining a memory footprint strictly sublinear to the input size.

The Memory Bottleneck in Interior Point Methods

The core of the memory problem lies in the computation of the Hessian matrix during each iteration of an IPM. The Hessian is used to determine the search direction and is structured as $H = A(S^{-1} \otimes S^{-1})A^\top$, where $A$ represents the vectorized constraints and $\otimes$ denotes the Kronecker product. Storing $A$ or computing $H$ exactly requires $O(mn^2)$ space, which is the primary bottleneck for large-scale applications.

Methodology: Robust IPM and Tensor Sketching

To overcome this bottleneck, the authors introduce a novel approach combining a robust optimization framework with advanced sketching techniques.

1. Robust IPM Framework

The algorithm utilizes a "robust" version of the IPM. Unlike standard IPMs that require exact Hessian calculations, this framework is designed to converge even when provided with only a spectral approximation of the Hessian. This tolerance for approximation is what allows for the use of sketching.

2. Tensor-Based Sketching (TensorSRHT)

The primary innovation is the application of the Tensor Subsampled Randomized Hadamard Transform (TensorSRHT). This specialized sketching matrix allows the solver to compute a compressed version of the Hessian in a single pass over the data.

Crucially, the authors exploit the "mixed product property" of Kronecker products. Because the Hessian involves $S^{-1} \otimes S^{-1}$, the sketch can be applied directly to the $n \times n$ matrices without ever explicitly forming the massive $n^2 \times n^2$ product. This "Kronecker Shortcut" allows the sketch to be applied in $O(n^2 \log n)$ time rather than $O(n^4)$, and more importantly, it keeps the space complexity independent of the total number of constraints $m$ in regimes where $n$ is dominant.

Key Results

Space and Pass Complexity

The proposed algorithm reduces the space requirement from $O(mn^2)$ to $O(m^2 + n^2)$. In the common regime where $n \gg m$, this represents a massive reduction in memory overhead. The algorithm requires $O(\sqrt{n} \log(1/\epsilon))$ passes over the data. While not a single-pass solution, this pass count is the standard "gold standard" for high-accuracy IPM convergence.

Runtime Efficiency

The algorithm achieves a runtime of $\tilde{O}(\sqrt{n}(m^{\omega-1}n^2 + n^\omega))$, where $\omega$ is the exponent of matrix multiplication. For scenarios where $m$ is relatively small ($m \le n^{0.25}$), this matches the performance of the fastest known non-streaming SDP solvers, proving that space efficiency does not necessarily come at the cost of speed.

Discussion and Future Work

This work represents the first successful application of sketching techniques to improve both the space and time complexity of SDP solvers. It shifts the utility of sketching from a purely speed-oriented tool to a vital memory-saving mechanism.

However, some limitations remain. The $O(\sqrt{n})$ pass count, while theoretically optimal for IPMs, may still be high for streaming contexts where I/O is the primary bottleneck. Additionally, if $m \gg n$, the $m^2$ term in the space complexity becomes the new limiting factor, leaving open the question of whether $O(m + n^2)$ space is achievable. Finally, while the theoretical bounds are promising, practical implementation and empirical benchmarking on real-world hardware remain for future research.

Summary updated

BibTeX
@misc{song2023streaming,
  author = {Zhao Song and Mingquan Ye and Lichen Zhang},
  title = {{Streaming Semidefinite Programs: O(√n) Passes, Small Space and Fast Runtime}},
  year = {2023},
  eprint = {2309.05135},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.05135},
}
Figure