对凸优化(Convex Optimization)的一些浅显理解

27e4efd6caed35c21f3cdab4cb362ce3.gif

©作者 | 李航前

单位 | EPFL

研究方向 | 计算机图形学与三维视觉

最近学习了一些凸优化课程,整理笔记的同时写下一些自己的理解,向着头秃的道路上越走越远。

凸优化是应用数学的一个基本分支,几乎在工程、基础科学和经济学的所有领域都有应用。例如,如果不理解凸优化的对偶理论,就不可能完全理解统计学习中的支持向量机(SVM)、电力市场中的节点定价、经济学中的基本福利定理或两人零和博弈中的纳什均衡。在计算机 AI 算法学习中,凸优化也是必要的一环。

先来做一些铺垫,引用自 EPFL 的凸优化课程,首先来看一个数学优化问题,如下图,该问题是为了寻找目标函数的最小值,其中涉及了目标函数,决策变量,可行域等概念。

08ad2628fc2eeff39a335072309f4130.png

▲ from MGT-418 Convex Optimization 

下面在说下确界的问题,下确界一定有(可以是负无穷)但是最小值不一定有。

9fe6e63fc851a2d3bd055106d51d07a5.png

▲ from MGT-418 Convex Optimization

abfadbdc917b30191b553e3102a4532b.png

▲ from MGT-418 Convex Optimization

以上说了全局最小值,但是一些情况下没有办法获得全局最小值,所以就要去计算局部最小值。它叫 优化问题。

5335c8635ad0ac39112b63652cad9db5.png

▲ from MGT-418 Convex Optimization

下图可视化展示了全局最小值和局部最小值的区别。

9603842e1b25b18c13cc2da495acca9d.png

有了一些直观的认识和浅显的理解,下面我们来具体聊凸函数的概念及判定方法、凸集、常见目标函数。

1533114b101bdc8ddd707aa0cb975275.png

凸集和凸函数

从函数的凹凸性而言,我们通常把函数分为凸函数和非凸函数。凸函数是有且只有全局最优解的,而非凸函数可能有多个局部最优解,这些特性我会在下文中进行详细解释。在前言中,我提到过优化问题是机器学习模型中的核心部分,而针对不同模型,有不同的方法论对其目标函数进行优化。例如针对逻辑回归、线性回归这样的凸函数,使用梯度下降或者牛顿法可以求出参数的全局最优解,针对神经网络这样的非凸函数,我们可能会找到许多局部最优解。

不难看出,我们希望在实际解决问题过程中,都希望我们建立的目标函数是凸函数,这样我们不必担心局部最优解问题,但实际上,我们遇到的问题大多数情况下建立的目标函数都是非凸函数,因此我们需要根据场景选择不同的优化方法。

bb59f71d0d6337247fb54ac4bf571b30.png

凸优化定义

就定义而言,凸优化是:在最小化(最大化)的优化要求下,目标函数是凸函数且约束条件所形成的可行域集合是一个凸集的优化方法,因此凸优化的判定条件有两个,1.函数定义域是凸集 2.目标函数是凸函数

凸集的定义:假设对于任意 x, y ∈ C and 任意参数 α ∈ [0, 1], 我们有 αx + (1 − α)y ∈ C,集合 C 为凸集。

凸集的理解:对凸集的理解,我们可以分别从理论定义的角度和函数图像的角度两方面理解。从定义上讲,对于集合 C 中的任意两个元素 x 和 y,需要满足 αx + (1−α)y 的值也需要在集合 C 中;从函数图像角度讲,这个定义中的式子含义是,x、y 两点连线上的任意一个点都需要属于集合 C,如下图所示,任何证明集合是凸集的方法都可以通过定义和函数图像两方面进行。

1235349f1f305ab7a42828ba5e1ebffb.png

凸集的性质:两个凸集的交集也是凸集。(注意,两个凸集的并集就不一定还是凸集了)

常见凸集与证明方法:

aebc71d344aa8e4e486a7251e2088cfe.png

凸函数定义:函数 f 的定义域为凸集,对于定义域里的任意 x, y,函数满足:

586e08abe993016282bdceb925c17144.png

f122cd0baf0c4120a3440ca049e23c4f.png

f86e0585f8da9b3adf0f172c9e34208a.png

凸函数与凹函数之间的关系:如果 f(x) 是凸函数,则 -f(x) 是凹函数

凸函数的证明方法(函数定义域为凸集的前提下):

02344238b773bdeee8236c4ca97657b9.png

常见凸函数及证明

ebd89310813d29071a0c760e609f0302.png

常见目标函数

针对一个 AI 问题,我们都可以将 AI 问题拆解为建立模型+优化模型这两块内容的,对于任何一个 AI 问题,其目标函数都可以用以下形式表示:

5ccabd6f2ce2d4306a41ce5e6d987cb2.png

我将解决业务问题中的常用套路称为算法思维,并总结了以下 4 个重要步骤:

  1. 将业务场景中需要解决的问题转化为数学问题,并写出严格的数学模型(目标函数)

  2. 针对写出的数学模型判断凹凸性

  3. 根据目标的函数的凹凸性判断问题类型(如果目标函数是凸函数,我们需要判断该函数所属问题类型,常见的问题类型有 Linear Programming、Quadratic Programming 等;如果目标函数是非凸函数,也需要判断其所属问题类型,常见有 Setcover Problem,Max flow Problem 等)

  4. 根据不同的问题类型使用不同的优化方法论解决问题。

其实在实际解决问题的过程中,其实大家都不太会在意第 1,2 个步骤点,可能都会直接通过经验去查找相应的工具解决问题,但是这样的解决思路是不太好的,因为在这个过程中,我们可能不知道需要解决的问题和我们选择的工具是否匹配,如果结果不太理想,我们可能也不知道其中的原因。但是如果我们在解决问题前,定义了严格的目标函数,我们不仅可以针对该目标函数选择相应的优化方法,也可以根据业务场景,对目标函数进行相应调整,增加项目的成功率。

而实际工作中常见的目标函数大概有以下:

f84a75d09effe504177401da223012d0.png

outside_default.png

参考文献

outside_default.png

[1] EE-556:https://moodle.epfl.ch/course/view.php?id=14220

[2] MGT-418:https://moodle.epfl.ch/course/view.php?id=15778

[3] AI工程师必备技能-凸优化介绍:https://www.jiqizhixin.com/articles/2019-01-23-15

特别鸣谢

感谢 TCCI 天桥脑科学研究院对于 PaperWeekly 的支持。TCCI 关注大脑探知、大脑功能和大脑健康。

更多阅读

5dfda2f69a7b4b1b5246a3e28576fbcd.png

bfe9ab96dc0fa679a3f9cb17e17dcedb.png

83d72918ddae896ea50f5a11e0d3cf86.png

0d85cb0a31c907f2187e707076e68eb8.gif

#投 稿 通 道#

 让你的文字被更多人看到 

如何才能让更多的优质内容以更短路径到达读者群体,缩短读者寻找优质内容的成本呢?答案就是:你不认识的人。

总有一些你不认识的人,知道你想知道的东西。PaperWeekly 或许可以成为一座桥梁,促使不同背景、不同方向的学者和学术灵感相互碰撞,迸发出更多的可能性。 

PaperWeekly 鼓励高校实验室或个人,在我们的平台上分享各类优质内容,可以是最新论文解读,也可以是学术热点剖析科研心得竞赛经验讲解等。我们的目的只有一个,让知识真正流动起来。

📝 稿件基本要求:

• 文章确系个人原创作品,未曾在公开渠道发表,如为其他平台已发表或待发表的文章,请明确标注 

• 稿件建议以 markdown 格式撰写,文中配图以附件形式发送,要求图片清晰,无版权问题

• PaperWeekly 尊重原作者署名权,并将为每篇被采纳的原创首发稿件,提供业内具有竞争力稿酬,具体依据文章阅读量和文章质量阶梯制结算

📬 投稿通道:

• 投稿邮箱:hr@paperweekly.site 

• 来稿请备注即时联系方式(微信),以便我们在稿件选用的第一时间联系作者

• 您也可以直接添加小编微信(pwbot02)快速投稿,备注:姓名-投稿

99ef653780e7282327d8222ac0cd73e9.png

△长按添加PaperWeekly小编

🔍

现在,在「知乎」也能找到我们了

进入知乎首页搜索「PaperWeekly」

点击「关注」订阅我们的专栏吧

·

69b09b3ac8a8025e6553a8c986cfab16.png

  • 0
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
非常经典,我们教材就用的这个!该版本非常清晰,强烈推荐! Preface xi 1 Introduction 1 1.1 Mathematical optimization . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Least-squares and linear programming . . . . . . . . . . . . . . . . . . 4 1.3 Convex optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 Nonlinear optimization . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.5 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.6 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 I Theory 19 2 Convex sets 21 2.1 Affine and convex sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.2 Some important examples . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.3 Operations that preserve convexity . . . . . . . . . . . . . . . . . . . . 35 2.4 Generalized inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.5 Separating and supporting hyperplanes . . . . . . . . . . . . . . . . . . 46 2.6 Dual cones and generalized inequalities . . . . . . . . . . . . . . . . . . 51 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3 Convex functions 67 3.1 Basic properties and examples . . . . . . . . . . . . . . . . . . . . . . 67 3.2 Operations that preserve convexity . . . . . . . . . . . . . . . . . . . . 79 3.3 The conjugate function . . . . . . . . . . . . . . . . . . . . . . . . . . 90 3.4 Quasiconvex functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 3.5 Log-concave and log-convex functions . . . . . . . . . . . . . . . . . . 104 3.6 Convexity with respect to generalized inequalities . . . . . . . . . . . . 108 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 viii Contents 4 Convex optimization problems 127 4.1 Optimization problems . . . . . . . . . . . . . . . . . . . . . . . . . . 127 4.2 Convex optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 4.3 Linear optimization problems . . . . . . . . . . . . . . . . . . . . . . . 146 4.4 Quadratic optimization problems . . . . . . . . . . . . . . . . . . . . . 152 4.5 Geometric programming . . . . . . . . . . . . . . . . . . . . . . . . . . 160 4.6 Generalized inequality constraints . . . . . . . . . . . . . . . . . . . . . 167 4.7 Vector optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 5 Duality 215 5.1 The Lagrange dual function . . . . . . . . . . . . . . . . . . . . . . . . 215 5.2 The Lagrange dual problem . . . . . . . . . . . . . . . . . . . . . . . . 223 5.3 Geometric interpretation . . . . . . . . . . . . . . . . . . . . . . . . . 232 5.4 Saddle-point interpretation . . . . . . . . . . . . . . . . . . . . . . . . 237 5.5 Optimality conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 5.6 Perturbation and sensitivity analysis . . . . . . . . . . . . . . . . . . . 249 5.7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 5.8 Theorems of alternatives . . . . . . . . . . . . . . . . . . . . . . . . . 258 5.9 Generalized inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 II Applications 289 6 Approximation and fitting 291 6.1 Norm approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 6.2 Least-norm problems . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 6.3 Regularized approximation . . . . . . . . . . . . . . . . . . . . . . . . 305 6.4 Robust approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 6.5 Function fitting and interpolation . . . . . . . . . . . . . . . . . . . . . 324 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 7 Statistical estimation 351 7.1 Parametric distribution estimation . . . . . . . . . . . . . . . . . . . . 351 7.2 Nonparametric distribution estimation . . . . . . . . . . . . . . . . . . 359 7.3 Optimal detector design and hypothesis testing . . . . . . . . . . . . . 364 7.4 Chebyshev and Chernoff bounds . . . . . . . . . . . . . . . . . . . . . 374 7.5 Experiment design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 Contents ix 8 Geometric problems 397 8.1 Projection on a set . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 8.2 Distance between sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 8.3 Euclidean distance and angle problems . . . . . . . . . . . . . . . . . . 405 8.4 Extremal volume ellipsoids . . . . . . . . . . . . . . . . . . . . . . . . 410 8.5 Centering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 8.6 Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 8.7 Placement and location . . . . . . . . . . . . . . . . . . . . . . . . . . 432 8.8 Floor planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 III Algorithms 455 9 Unconstrained minimization 457 9.1 Unconstrained minimization problems . . . . . . . . . . . . . . . . . . 457 9.2 Descent methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 9.3 Gradient descent method . . . . . . . . . . . . . . . . . . . . . . . . . 466 9.4 Steepest descent method . . . . . . . . . . . . . . . . . . . . . . . . . 475 9.5 Newton’s method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 9.6 Self-concordance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 9.7 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 10 Equality constrained minimization 521 10.1 Equality constrained minimization problems . . . . . . . . . . . . . . . 521 10.2 Newton’s method with equality constraints . . . . . . . . . . . . . . . . 525 10.3 Infeasible start Newton method . . . . . . . . . . . . . . . . . . . . . . 531 10.4 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 11 Interior-point methods 561 11.1 Inequality constrained minimization problems . . . . . . . . . . . . . . 561 11.2 Logarithmic barrier function and central path . . . . . . . . . . . . . . 562 11.3 The barrier method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 11.4 Feasibility and phase I methods . . . . . . . . . . . . . . . . . . . . . . 579 11.5 Complexity analysis via self-concordance . . . . . . . . . . . . . . . . . 585 11.6 Problems with generalized inequalities . . . . . . . . . . . . . . . . . . 596 11.7 Primal-dual interior-point methods . . . . . . . . . . . . . . . . . . . . 609 11.8 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 x Contents Appendices 631 A Mathematical background 633 A.1 Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 A.2 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 A.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 A.4 Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 640 A.5 Linear algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 B Problems involving two quadratic functions 653 B.1 Single constraint quadratic optimization . . . . . . . . . . . . . . . . . 653 B.2 The S-procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 B.3 The field of values of two symmetric matrices . . . . . . . . . . . . . . 656 B.4 Proofs of the strong duality results . . . . . . . . . . . . . . . . . . . . 657 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 C Numerical linear algebra background 661 C.1 Matrix structure and algorithm complexity . . . . . . . . . . . . . . . . 661 C.2 Solving linear equations with factored matrices . . . . . . . . . . . . . . 664 C.3 LU, Cholesky, and LDLT factorization . . . . . . . . . . . . . . . . . . 668 C.4 Block elimination and Schur complements . . . . . . . . . . . . . . . . 672 C.5 Solving underdetermined linear equations . . . . . . . . . . . . . . . . . 681 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 References 685 Notation 697 Index 701

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值