# 半定规划

半定规划（SDP）是在对称矩阵的仿射组合为半正定的约束下，最小化或最大化对称矩阵的线性函数。该约束是非线性、非光滑的，但却是凸的，因此每个半定规划都是凸优化问题；半定规划通过将一个非负变量向量替换为要求半正定的矩阵，推广了线性规划，并且它支撑着近似算法、控制理论和机器学习。<sup>[1](https://doi.org/10.1137/1038003)</sup>

| 关键事实 | 详情 |
|---|---|
| 可行集 | “X ⪰ 0”表示对称矩阵 X 的所有特征值非负；该可行集称为谱多面体<sup>[2](https://ocw.mit.edu/courses/6-251j-introduction-to-mathematical-programming-fall-2009/08bbc2660764c4f61bde5363ae134339_MIT6_251JF09_SDP.pdf)</sup> |
| 与 LP 的关系 | LP ⊆ SOCP ⊆ SDP；LP 是所有矩阵均为对角矩阵的特殊情形<sup>[3](https://www.mit.edu/~parrilo/cdc03_workshop/ejc03_comp.pdf)</sup><sup> • </sup><sup>[4](https://www.princeton.edu/~aaa/Public/Teaching/ORF363_COS323/F21/ORF363_COS323_F21_Lec13.pdf)</sup> |
| 对偶性 | 弱对偶性总是成立；强对偶性需要严格可行（Slater）条件，否则可能失败<sup>[5](https://www.scielo.br/j/pope/a/7BrjgJmN5FSSykpGjx6Lb6b/)</sup> |
| 求解器复杂度 | 内点法在 \( O(\sqrt{n} \log(1/\varepsilon)) \) 次迭代内收敛到 ε 对偶间隙，实践中通常为 5–50 次<sup>[6](https://arxiv.org/html/2407.14013)</sup><sup> • </sup><sup>[1](https://doi.org/10.1137/1038003)</sup> |
| 里程碑应用 | 戈曼斯–威廉姆森最大割算法保证期望值至少为最优值的 0.87856 倍<sup>[7](https://math.mit.edu/~goemans/PAPERS/maxcut-jacm.pdf)</sup> |
| 知名求解器 | SDPT3、SeDuMi、SDPA、CSDP、DSDP、MOSEK；没有单一代码在所有问题上一致优于其他代码<sup>[3](https://www.mit.edu/~parrilo/cdc03_workshop/ejc03_comp.pdf)</sup> |

## 工作原理

在标准形式中，原问题是最小化 \( C \cdot X \)，约束为对 \( i = 1, \ldots, m \) 有 \( A_{i} \cdot X = b_{i} \)，且 \( X \succeq 0 \)，其中 \( U \cdot V \) 表示 \( U^{T} \cdot V \) 的迹，而 \( C, A_{i} \) 是对称的 \( n \times n \) 矩阵。<sup>[2](https://ocw.mit.edu/courses/6-251j-introduction-to-mathematical-programming-fall-2009/08bbc2660764c4f61bde5363ae134339_MIT6_251JF09_SDP.pdf)</sup> 对偶问题最大化 \( b^T y \)，约束为 \( S = C - \sum_i y_i A_i \succeq 0 \)，这是关于 \( y \) 的线性矩阵不等式。由于半正定矩阵锥在迹内积下是自对偶的，半定规划的对偶仍然是半定规划。<sup>[8](https://stanford-cme-307.github.io/web/notes/2025fall/lec10.pdf)</sup>

对任意可行 \( X \) 和 \( (y, S) \)，对偶间隙为 \( C \cdot X - b^{T} y = S \cdot X \ge 0 \)，因此零间隙证明最优性，并带有标量互补条件 \( S \cdot X = 0 \)，而对于半正定 \( X \) 和 \( S \)，这意味着矩阵方程 \( XS = 0 \)。<sup>[2](https://ocw.mit.edu/courses/6-251j-introduction-to-mathematical-programming-fall-2009/08bbc2660764c4f61bde5363ae134339_MIT6_251JF09_SDP.pdf)</sup> 强对偶性并非自动成立：与线性规划不同，半定规划或其对偶可能无法达到最优值，而且存在可解的原–对偶对具有严格正的对偶间隙。Slater 条件，即存在严格可行点 X ≻ 0 和 S ≻ 0，可恢复强对偶性。<sup>[5](https://www.scielo.br/j/pope/a/7BrjgJmN5FSSykpGjx6Lb6b/)</sup><sup> • </sup><sup>[2](https://ocw.mit.edu/courses/6-251j-introduction-to-mathematical-programming-fall-2009/08bbc2660764c4f61bde5363ae134339_MIT6_251JF09_SDP.pdf)</sup>

从几何上看，半正定锥是尖的、闭的、凸的、满维的，但不是多面体的，而对角线为单位值的半正定矩阵（相关矩阵）构成椭球面体。<sup>[9](https://www.mi.uni-koeln.de/opt/wp-content/uploads/2015/10/laurent_vallentin_sdo_2012_05.pdf)</sup><sup> • </sup><sup>[10](https://people.orie.cornell.edu/miketodd/orie6327/lec01.pdf)</sup> 由于谱多面体可以有无穷多个极点，单纯形类算法不适用，而内点法可以自然推广；每个多面体都是谱多面体，而 LP 是所有矩阵均为对角矩阵的半定规划。<sup>[4](https://www.princeton.edu/~aaa/Public/Teaching/ORF363_COS323/F21/ORF363_COS323_F21_Lec13.pdf)</sup>

## 求解方法

经典算法将原问题替换为对数障碍问题：最小化 C • X − θ ln(det X)，约束为等式约束和 X ≻ 0，并随着 θ 减小而沿中心路径前进。<sup>[2](https://ocw.mit.edu/courses/6-251j-introduction-to-mathematical-programming-fall-2009/08bbc2660764c4f61bde5363ae134339_MIT6_251JF09_SDP.pdf)</sup> 障碍函数 \( -\ln \det X \) 是半正定锥的对数障碍。<sup>[11](https://people.orie.cornell.edu/miketodd/soa5.pdf)</sup> 每一步求解牛顿系统（正规方程），给出二次局部收敛；原–对偶路径跟踪变体同时追踪两条中心路径，允许使用自对偶嵌入进行初始化，并产生不可行性证书。<sup>[2](https://ocw.mit.edu/courses/6-251j-introduction-to-mathematical-programming-fall-2009/08bbc2660764c4f61bde5363ae134339_MIT6_251JF09_SDP.pdf)</sup><sup> • </sup><sup>[12](https://www2.isye.gatech.edu/~nemirovs/Published.pdf)</sup>

在实践中，内点法代码大约在 5–50 次迭代内求解半定规划，每次迭代本质上是一个与原问题规模相同的最小二乘问题。<sup>[1](https://doi.org/10.1137/1038003)</sup> 达到 ε 对偶间隙的迭代次数为 \( O(\sqrt{n} \log(1/\varepsilon)) \)。<sup>[6](https://arxiv.org/html/2407.14013)</sup> 标准形式的一次迭代花费 \( O(m \cdot n^{3} + m^{2} \cdot n^{2} + m^{3}) \) 次浮点运算，其中形成和分解 Schur 补占主导地位：在 SDPT3 中，根据问题类别不同，它占计算工作量的 25% 到 99%。<sup>[13](https://arxiv.org/html/2508.05854v2)</sup><sup> • </sup><sup>[14](https://www.math.cmu.edu/~reha/Pss/final.pdf)</sup> 对于 m = Θ(n²) 个约束，直接方法花费 Θ(n⁶) 时间和 Θ(n⁴) 内存，将 n 限制在约 200。<sup>[6](https://arxiv.org/html/2407.14013)</sup> 一种 2024 年的良态原–对偶内点法将每次迭代成本降至 \( O(n^{3}) \) 时间和 \( O(n^{2}) \) 内存，或者当 r 界定了解的秩时，使用预条件子可达到 \( O(n^{3} \cdot r^{3}) \) 时间和 \( O(n^{2} \cdot r^{2}) \) 内存，并且在精度约为 \( \mu \approx 10^{-12} \) 时仍然有效。<sup>[6](https://arxiv.org/html/2407.14013)</sup>

## 起源

历史可追溯至李雅普诺夫（Lyapunov）1890 年的稳定性刻画，其中涉及线性矩阵不等式（LMI），以及 20 世纪 40–60 年代苏联在控制理论中确立 LMI 的工作。<sup>[11](https://people.orie.cornell.edu/miketodd/soa5.pdf)</sup> 一个半定规划问题被构造出来，并带有对偶以及表明强对偶性需要额外正则性的对偶定理。<sup>[11](https://people.orie.cornell.edu/miketodd/soa5.pdf)</sup> 一个半定规划可界定图的香农容量，并求出了五边形的容量。<sup>[11](https://people.orie.cornell.edu/miketodd/soa5.pdf)</sup>

现代算法时代始于卡马卡（Karmarkar）1984 年针对 LP 的多项式时间内点法之后。<sup>[1](https://doi.org/10.1137/1038003)</sup> 涅斯捷罗夫（Nesterov）和涅米罗夫斯基（Nemirovskii）发展了自和谐障碍函数理论，表明包括半定规划在内的广泛凸问题族是多项式时间可解的；他们的框架出现在 1994 年的 SIAM 书中。<sup>[15](https://doi.org/10.1137/1.9781611970791)</sup> 独立地，法里德·阿里扎德（Farid Alizadeh）在其 1995 年《SIAM 优化杂志》论文中将势下降方法从 LP 扩展到 SDP，其动机是组合优化的强界。<sup>[16](https://doi.org/10.1137/0805002)</sup> 同年，米歇尔·X·戈曼斯（Michel X. Goemans）和大卫·P·威廉姆森（David P. Williamson）在《ACM 杂志》上引入了基于 SDP 的最大割近似算法，<sup>[17](https://doi.org/10.1145/227683.227684)</sup> 而利芬·范登伯格（Lieven Vandenberghe）和斯蒂芬·博伊德（Stephen Boyd）在《数学规划》上发表了针对涉及矩阵不等式问题的原–对偶势下降方法，<sup>[18](https://doi.org/10.1007/bf01585558)</sup> 随后他们 1996 年的《SIAM 评论》综述成为 SDP 基本理论和初始应用的标准论述。<sup>[1](https://doi.org/10.1137/1038003)</sup> 20 世纪 90 年代，随着新应用和高效算法的出现，兴趣急剧增长。<sup>[19](https://convexoptimization.com/TOOLS/Handbook.pdf)</sup>

## 变体

原–对偶内点法有若干搜索方向族：HRVW/KSH/M 搜索方向，以及针对自缩放锥的 Nesterov–Todd 方向，后者在 LP、SOCP 和 SDP 中同样实现了原–对偶方法的全部能力。<sup>[20](https://epubs.siam.org/doi/10.1137/S1052623495296115)</sup><sup> • </sup><sup>[21](https://doi.org/10.1137/s1052623495290209)</sup><sup> • </sup><sup>[12](https://www2.isye.gatech.edu/~nemirovs/Published.pdf)</sup> 对于大规模问题，三种替代方案占主导地位。Burer–Monteiro 低秩分解由塞缪尔·伯勒（Samuel Burer）和雷纳托·D.C.蒙泰罗（Renato D.C. Monteiro）于 2003 年在《数学规划》上发表，将原问题改写为最小化 \(\langle C, LL^{T}\rangle\)，约束为 \(A(LL^{T}) = b\)，其中 \( L \) 中受限的列数界定了因子秩：所得问题是非凸的，如果秩界足够大以表示最优解，则它等价于 SDP，并且在附加条件下局部优化可以恢复 SDP 最优解，但一般而言非线性规划求解器不保证找到它。<sup>[22](https://doi.org/10.1007/s10107-002-0352-8)</sup> 谱束法由 C. Helmberg 和 F. Rendl 于 2000 年在《SIAM 优化杂志》上针对具有低秩原解的大规模对偶形式 SDP 引入，仅使用矩阵–向量乘积和最大特征值计算。<sup>[23](https://doi.org/10.1137/s1052623497328987)</sup><sup> • </sup><sup>[24](https://stephentu.github.io/writeups/first-order-sdp.pdf)</sup> 可扩展的 SDP 一阶算法依赖于增广拉格朗日技术和交替方向乘子法。<sup>[25](https://www.annualreviews.org/content/journals/10.1146/annurev-control-091819-074326)</sup> 首批可证明收敛的、用于半定优化的量子内点法由布兰登·奥古斯蒂诺（Brandon Augustino）、贾科莫·南尼奇尼（Giacomo Nannicini）、陶马什·泰尔拉基（Tamás Terlaky）和路易斯·F.苏卢阿加（Luis F. Zuluaga）提出（2023 年）。<sup>[26](https://doi.org/10.22331/q-2023-09-11-1110)</sup>

## 应用

**组合优化。** 戈曼斯和威廉姆森针对 MAX CUT 和 MAX 2SAT 的随机算法给出期望值至少为最优值 0.87856 倍的解；该方案将最大割松弛为在约束 \(X_{ii} = 1\)、\(X \succeq 0\) 下最大化 \(\frac{1}{4}\sum w_{ij}(1 - X_{ij})\)，这是通过将变量提升为单位向量得到的，然后用随机超平面进行舍入。<sup>[7](https://math.mit.edu/~goemans/PAPERS/maxcut-jacm.pdf)</sup><sup> • </sup><sup>[8](https://stanford-cme-307.github.io/web/notes/2025fall/lec10.pdf)</sup>

**图论。** 洛瓦兹 θ 函数可以表示为特征值界、半定规划，或通过正交表示来表达，并促使格勒切尔、洛瓦兹和斯赫赖弗得到了唯一已知的、用于完美图最大稳定集的多项式时间算法。<sup>[27](https://math.mit.edu/~goemans/PAPERS/icm98.pdf)</sup>

**多项式优化。** 多项式非负性的平方和（SOS）证书可重新表述为 SDP；次数为 t 的 SOS 层级可在 \( m \cdot n^{O(t)} \) 时间内求解，并在次数 t = n 时以指数时间恢复整数包。<sup>[3](https://www.mit.edu/~parrilo/cdc03_workshop/ejc03_comp.pdf)</sup><sup> • </sup><sup>[28](http://www.cs.toronto.edu/~toni/Courses/Proofs-SOS-2018/Lectures/maxcut.pdf)</sup> 该方法有局限：检验四次多项式的非负性是 NP 难的，多项式规模的 SDP 无法击败 max-sat 的 7/8 近似，而且割、TSP 和稳定集多面体具有超多项式半定扩展复杂度。<sup>[4](https://www.princeton.edu/~aaa/Public/Teaching/ORF363_COS323/F21/ORF363_COS323_F21_Lec13.pdf)</sup><sup> • </sup><sup>[29](https://dl.acm.org/doi/10.1145/2746539.2746599)</sup>

**控制。** 线性系统 \(\dot{x} = Ax\) 指数稳定当且仅当存在 \(P \succ 0\) 使得 \(A^{T}P + PA \prec 0\)，这是一个 LMI，其可行性是一个 SDP；开创性的代码是 MATLAB LMI 工具箱和 SP。<sup>[8](https://stanford-cme-307.github.io/web/notes/2025fall/lec10.pdf)</sup><sup> • </sup><sup>[3](https://www.mit.edu/~parrilo/cdc03_workshop/ejc03_comp.pdf)</sup>

## 局限与替代方案

**对偶性病态。** 没有严格可行性时，SDP 对可能具有严格正的对偶间隙，或具有零间隙但最优值不可达，一阶最优性条件可能无意义，并且原–对偶内点法会受到负面影响；严格可行性的丧失比先前认识到的更为常见。面缩减预处理将问题限制到包含可行域的锥的最小面，从而正则化此类退化实例。<sup>[5](https://www.scielo.br/j/pope/a/7BrjgJmN5FSSykpGjx6Lb6b/)</sup><sup> • </sup><sup>[30](https://www.math.uwaterloo.ca/~hwolkowi/henry/reports/asurveyFR.pdf)</sup>

**数值条件与规模。** 内点法系统在高精度下会变得病态；一个谱预条件子的条件数以 Θ(1/μ²) 发散，将精度限制在约 μ ≈ \( 10^{-6} \)。<sup>[6](https://arxiv.org/html/2407.14013)</sup> 可扩展性历来是在机器学习、控制和机器人学中应用 SDP 的主要障碍。<sup>[25](https://www.annualreviews.org/content/journals/10.1146/annurev-control-091819-074326)</sup>

**与邻近类别的比较。** 包含关系 LP ⊆ SOCP ⊆ SDP 排序了建模能力，但二阶锥规划保留了 SDP 的大部分表达能力，同时可扩展到数万个变量，而 SDP 无法达到；用 LP 或 SOCP 近似 SDP 以可扩展性换取保守性。<sup>[3](https://www.mit.edu/~parrilo/cdc03_workshop/ejc03_comp.pdf)</sup><sup> • </sup><sup>[25](https://www.annualreviews.org/content/journals/10.1146/annurev-control-091819-074326)</sup> SDP 可以在多项式时间内以任意指定精度由椭球算法近似，或更高效地由内点法近似，尽管判定 SDP 的精确可行性仍然悬而未决。<sup>[27](https://math.mit.edu/~goemans/PAPERS/icm98.pdf)</sup>

## References

1. [Lieven Vandenberghe, Stephen Boyd (1996). Semidefinite Programming. SIAM Review.](https://doi.org/10.1137/1038003)
2. [Introduction to Semidefinite Programming (MIT OCW 6.251J lecture notes)](https://ocw.mit.edu/courses/6-251j-introduction-to-mathematical-programming-fall-2009/08bbc2660764c4f61bde5363ae134339_MIT6_251JF09_SDP.pdf)
3. [Semidefinite Programming Relaxations and Algebraic Optimization in Control (Parrilo, ECC 2003)](https://www.mit.edu/~parrilo/cdc03_workshop/ejc03_comp.pdf)
4. [ORF363 Lecture 13: Semidefinite Programming (Amir Ali Ahmadi, Princeton)](https://www.princeton.edu/~aaa/Public/Teaching/ORF363_COS323/F21/ORF363_COS323_F21_Lec13.pdf)
5. [Linear and nonlinear semidefinite programming (SciELO survey)](https://www.scielo.br/j/pope/a/7BrjgJmN5FSSykpGjx6Lb6b/)
6. [Well-conditioned Primal-Dual Interior-point Method for Accurate Low-rank Semidefinite Programming (2024)](https://arxiv.org/html/2407.14013)
7. [Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming (Goemans & Williamson, JACM)](https://math.mit.edu/~goemans/PAPERS/maxcut-jacm.pdf)
8. [Lecture 10: Semidefinite Programming and Conic Optimization (Stanford CME 307, fall 2025)](https://stanford-cme-307.github.io/web/notes/2025fall/lec10.pdf)
9. [Theory and algorithms for semidefinite optimization (Laurent & Vallentin lecture notes)](https://www.mi.uni-koeln.de/opt/wp-content/uploads/2015/10/laurent_vallentin_sdo_2012_05.pdf)
10. [Semidefinite Programming Lecture 1 (Mike Todd, Cornell OR 6327)](https://people.orie.cornell.edu/miketodd/orie6327/lec01.pdf)
11. [Semidefinite optimization (Michael J. Todd, Acta Numerica survey)](https://people.orie.cornell.edu/miketodd/soa5.pdf)
12. [Interior-point methods for optimization (Nemirovski & Todd, Acta Numerica)](https://www2.isye.gatech.edu/~nemirovs/Published.pdf)
13. [Tailored First-order and Interior-point methods and a new SDP hierarchy for entanglement detection (2025)](https://arxiv.org/html/2508.05854v2)
14. [Solving semidefinite-quadratic-linear programs using SDPT3](https://www.math.cmu.edu/~reha/Pss/final.pdf)
15. [Yurii Nesterov, Arkadii Nemirovskii (1994). Interior-Point Polynomial Algorithms in Convex Programming. Society for Industrial and Applied Mathematics eBooks.](https://doi.org/10.1137/1.9781611970791)
16. [Farid Alizadeh (1995). Interior Point Methods in Semidefinite Programming with Applications to Combinatorial Optimization. SIAM Journal on Optimization.](https://doi.org/10.1137/0805002)
17. [Michel X. Goemans, David P. Williamson (1995). Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. Journal of the ACM.](https://doi.org/10.1145/227683.227684)
18. [Lieven Vandenberghe, Stephen Boyd (1995). A primal, dual potential reduction method for problems involving matrix inequalities. Mathematical Programming.](https://doi.org/10.1007/bf01585558)
19. [Handbook of Semidefinite Programming (Wolkowicz, Saigal, Vandenberghe, eds., 2000)](https://convexoptimization.com/TOOLS/Handbook.pdf)
20. [On Extending Some Primal-Dual Interior-Point Algorithms From Linear Programming to Semidefinite Programming (Zhang, SIAM J. Optim. 1998)](https://epubs.siam.org/doi/10.1137/S1052623495296115)
21. [Yu. E. Nesterov, M. J. Todd (1998). Primal-Dual Interior-Point Methods for Self-Scaled Cones. SIAM Journal on Optimization.](https://doi.org/10.1137/s1052623495290209)
22. [Samuel Burer, Renato D.C. Monteiro (2003). A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization. Mathematical Programming.](https://doi.org/10.1007/s10107-002-0352-8)
23. [C. Helmberg, F. Rendl (2000). A Spectral Bundle Method for Semidefinite Programming. SIAM Journal on Optimization.](https://doi.org/10.1137/s1052623497328987)
24. [Practical first order methods for large scale semidefinite programming](https://stephentu.github.io/writeups/first-order-sdp.pdf)
25. [Recent Scalability Improvements for Semidefinite Programming with Applications in Machine Learning, Control, and Robotics (Annual Reviews)](https://www.annualreviews.org/content/journals/10.1146/annurev-control-091819-074326)
26. [Brandon Augustino and colleagues (2023). Quantum Interior Point Methods for Semidefinite Optimization. Quantum.](https://doi.org/10.22331/q-2023-09-11-1110)
27. [Semidefinite programming in combinatorial optimization (Goemans, ICM 1998 survey)](https://math.mit.edu/~goemans/PAPERS/icm98.pdf)
28. [Goemans and Williamson Algorithm for MAXCUT (course notes, Univ. of Toronto)](http://www.cs.toronto.edu/~toni/Courses/Proofs-SOS-2018/Lectures/maxcut.pdf)
29. [Lower Bounds on the Size of Semidefinite Programming Relaxations (STOC 2015)](https://dl.acm.org/doi/10.1145/2746539.2746599)
30. [The many faces of degeneracy in conic optimization (Wolkowicz et al., Found. Trends Optim.)](https://www.math.uwaterloo.ca/~hwolkowi/henry/reports/asurveyFR.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数学分析与数学模型 › Numerical analysis and computation › Optimization algorithms

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/semidefinite-programming

English original: https://www.edgepedia.org/semidefinite-programming
