Optimization Week 11: Constrained descent, Coordinate descent, Subgradient

1 Coordinate descent

1.1 Will it be optimal?

When f ( x + δ e i ) ≥ f ( x ) , ∀ e i , δ f(x+\delta e_i)\geq f(x),\forall e_i, \delta f(x+δei)f(x),ei,δ

Optimal when f f f is convex and smooth

Not necessary when f f f is nonconvex and smooth

Not necessary when f f f is convex and nonsmooth

Optimal when f f f can be decomposed into a convex smooth function and a set of convex, nonsmooth and seperable functions

1.2 Algorithm

x i t + 1 = arg min ⁡ x i f ( x i , x / i t ) x_i^{t+1}=\argmin_{x_i} f(x_i,x_{/ i}^t) xit+1=xiargminf(xi,x/it)
x i t + 1 = x i t − η t ∇ i f ( x i t , x / i t ) x_i^{t+1}=x_i^{t}-\eta_t\nabla_i f(x_i^t,x_{/ i}^t) xit+1=xitηtif(xit,x/it)
Order can be arbitrary, only when every coordinate is updated infinite times.

2 Subgradients

2.1 Subgradients

Convex functions always have subgradients.

g g g is the subgradient of f f f at x x x when:
f ( y ) ≥ f ( x ) + g T ( y − x ) , ∀ y \quad f(y)\geq f(x)+g^T(y-x),\forall y f(y)f(x)+gT(yx),y

2.2 Subdifferential

∂ f ( x ) = { g : g is the subgradient of f at x } \partial f(x)=\{g: \text{g is the subgradient of f at x}\} f(x)={g:g is the subgradient of f at x}

2.3 Property

  • Linearity
    ∂ ( a 1 f 1 + a 2 f 2 ) = a 1 ∂ f 1 + a 2 ∂ f 2 \partial (a_1f_1+a_2f_2)=a_1\partial f_1 +a_2\partial f_2 (a1f1+a2f2)=a1f1+a2f2
  • Affine composition
    g ( x ) = f ( A x + b ) g(x)=f(Ax+b) g(x)=f(Ax+b) ∂ g ( x ) = ∂ A f ( A x + b ) \partial g(x)=\partial A f(Ax+b) g(x)=Af(Ax+b)

2.4 Optimality conditions

When f f f is convex:
f ( x ∗ ) = min ⁡ x f ( x ) ⇔ 0 ∈ f ( x ∗ ) f(x^*)=\min_x f(x) \Leftrightarrow 0\in f(x^*) f(x)=xminf(x)0f(x) where x x x is not constrained.

For constrained problems, KKT conditions should be stasfied (or normal cone?OL, 0 ∈ f ( x ∗ ) + N ( x ∗ ) 0\in f(x^*)+N(x^*) 0f(x)+N(x)), the gradient of lagrangian is converted into the subgradient of the lagrangian.

But the subgradient select is not necessarily a descent direction!

2.5 Subgradient method

Problem of GD for non-smooth fucntions

It may oscillate around the nondifferentiable point.

Subgradient method

x t + 1 = x t − η t g t x_{t+1}=x_t-\eta_t g_t xt+1=xtηtgt where g t ∈ ∂ f ( x t ) g_t \in \partial f(x_t) gtf(xt), g t g_t gt may not be a descent direction.
f ( x b e s t t ) = min ⁡ s ≤ t f ( x s ) f(x_{best}^t)=\min_{s\leq t}f(x_s) f(xbestt)=stminf(xs)

Therom of error

For Lipschitz G G G that ∣ ∣ f ( x ) − f ( y ) ∣ ∣ ≤ G ∣ ∣ x − y ∣ ∣ ||f(x)-f(y)||\leq G||x-y|| f(x)f(y)Gxy
For fixed η \eta η:
lim ⁡ t → ∞ f ( x b e s t t ) ≤ f ∗ + η G 2 2 \lim_{t\rightarrow \infin} f(x_{best}^t)\leq f^*+\frac{\eta G^2}{2} tlimf(xbestt)f+2ηG2 So, the we need step size η → 0 \eta \rightarrow 0 η0 and ∑ η i → ∞ \sum\eta_i \rightarrow \infin ηi

Step and convergence

  • η = 1 t \eta =\frac{1}{\sqrt{t}} η=t 1
  • f ( x b e s t t ) − f ∗ ≤ O ( R 2 + G 2 t ) f(x_{best}^t)-f^*\leq O(\frac{R^2+G^2}{\sqrt t}) f(xbestt)fO(t R2+G2), where R R R is the initial distance.
  • Need O ( 1 ε 2 ) O(\frac{1}{\varepsilon^2}) O(ε21) steps to reach ε \varepsilon ε accuracy, while GD only needs O ( 1 ε ) O(\frac{1}{\varepsilon}) O(ε1) steps.
  • In general, cannot do better than O ( 1 ε 2 ) O(\frac{1}{\varepsilon^2}) O(ε21), for the update x t ∈ x 0 + s p a n ( g 0 . . . g t − 1 ) x_t\in x_0+span(g_0...g_{t-1}) xtx0+span(g0...gt1) will have f ( x t ) − f ( x ∗ ) ≥ R G 2 ( 1 + ( t + 1 ) ) f(x_t)-f(x^*)\geq \frac{RG}{2(1+\sqrt(t+1))} f(xt)f(x)2(1+( t+1))RG

3 Gradient, subgradient, proximal

3.1 Convex: Subgradient, O ( 1 t ) O(\frac{1}{\sqrt t}) O(t 1), O ( 1 ε 2 ) O(\frac{1}{\varepsilon^2}) O(ε21)

3.2 Convex + decomposable to smooth and nonsmooth but seperable functions: Proximal gradient descent, O ( 1 t ) O(\frac{1}{ t}) O(t1), O ( 1 ε ) O(\frac{1}{\varepsilon}) O(ε1)

3.3 Convex + Smooth: Gradient descent, O ( 1 t ) O(\frac{1}{ t}) O(t1), O ( 1 ε ) O(\frac{1}{\varepsilon}) O(ε1)

3.4 Strongly convex: Subgradient descent, O ( 1 t ) O(\frac{1}{ t}) O(t1), O ( 1 ε ) O(\frac{1}{\varepsilon}) O(ε1)

3.5 Smooth + Strongly convex: Gradient descent, O ( ( 1 − m / M ) t ) O((1-m/M)^t) O((1m/M)t), O ( l o g ( 1 / ε ) ) O(log(1/\varepsilon)) O(log(1/ε))

No smooth, use subgradient or proximal (decomposable)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 很抱歉,操作已被取消。这个错误提示意味着优化循环失败了,因为操作被取消了。这通常是由于某些原因导致代码停止执行而引起的,比如在优化循环中手动停止了代码,或者操作系统中断了代码的执行等等。 要解决这个问题,你可以尝试以下几个步骤: 1. 检查你的代码是否有任何不必要的死循环或无限循环等问题,这可能会导致代码长时间运行而被中断。 2. 确保你的计算机有足够的资源来运行代码,例如内存和处理器速度。 3. 确保你的代码没有被其他程序或进程占用了资源,可能会导致代码无法顺利执行。 4. 如果你在使用某个软件库或框架,可以检查其文档或社区,看看是否有其他人遇到过相似的问题,并尝试查找解决方案。 如果以上步骤都没有解决问题,你可以尝试使用调试器来诊断代码问题,或者联系相关技术支持获取帮助。 ### 回答2: 优化循环失败:取消:操作已取消。 这是一个常见的错误提示消息,通常出现在使用计算机或软件进行优化时。这个错误信息表示,计算机或软件在执行优化过程中出现了一些问题,导致该过程被取消。 造成这种错误的原因可能很多,主要包括以下几个方面: 1.系统资源不足:计算机或软件执行优化操作所需的系统资源(例如内存、磁盘空间、CPU等)不足,导致优化过程中断。 2.优化参数错误:当使用不正确的优化参数时,计算机或软件可能无法正确地执行优化操作,从而导致失败。 3.优化算法问题:计算机或软件使用的优化算法可能存在问题,例如算法不充分、无法收敛等,导致优化过程失败。 4.数据错误:在进行优化操作时,输入的数据可能存在错误或异常,例如数据格式不正确、数据缺失、数据错误等,导致优化过程失败。 为了解决这个问题,我们可以尝试以下几种方法: 1.检查计算机或软件的系统资源是否足够,如果不足,可以尝试增加系统资源,例如增加内存、清理磁盘空间等。 2.检查所使用的优化参数是否正确,如果不正确,可以尝试修改参数设置,或者参考软件的使用手册寻求帮助。 3.尝试更换优化算法,如果当前算法无法收敛或存在其他问题,可以尝试使用其他优化算法。 4.检查输入的数据是否正确,如果存在错误或异常,可以尝试修复数据或寻找新的数据来源。 总之,优化循环失败:取消:操作已取消的错误提示信息,通常表示在进行优化操作时出现了一些问题。在解决问题时,需要仔细检查系统资源、优化参数、优化算法和输入数据等方面的问题,以寻找解决方法。 ### 回答3: 优化循环失败:取消:操作被取消。 这是指在进行某项优化操作时出现了错误,导致操作被取消。在计算机中,优化循环指的是通过反复迭代来改进某个算法或模型的性能。当出现“优化循环失败:取消:操作被取消”错误时,意味着系统由于某种原因无法继续执行当前的操作,进而停止了优化循环。 出现这种错误的原因可能有多种,例如:硬件故障、软件崩溃、内存不足、或其他异常情况都可能导致该错误的出现。如果该错误一直出现,可能需要对计算机进行检查和维护,确保其处于正常的工作状态。 为了解决这个问题,可以尝试重新启动计算机,或者通过终止相关应用程序来释放系统资源等方式,来解决可能导致该错误的一些常见问题。此外,如果在使用某些特定的软件或工具时经常遇到该错误,也可以尝试更新相关软件,或者使用更稳定的在其他操作系统等替代方案。最终,为了尽可能避免出现该错误,建议在进行重要的算法或优化操作时,一定要进行备份,并保持足够的耐心和耐心。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值