Constrained Optimization

Roh's warehouse·2025년 9월 21일

Optimization in Learning

목록 보기
5/8

Constrained Optimization

General Constrained Optimization

minimizef(x)subject togi(x)0,i=1,,lhj(x)=0,j=1,,m\begin{aligned} & \text{minimize} & & f(x) \\ & \text{subject to} & & g_i(x) \le 0, \quad i=1,\dots,l\\ & & & h_j(x) = 0, \quad j=1,\dots,m\\ \end{aligned}
  • ff : objective function.

  • gig_i : inequality constraints.

  • hjh_j : equality constraints.

  • 제약 조건을 만족하는 xx의 집합을 feasible set 이라고 한다.

  • xx에 대해 A(x)={i:gi(x)=0}{j:hj(x)=0}A(x)=\{i:g_i(x)=0\} \cup \{j:h_j(x)=0\}active set 이라고 한다.

  • 주어진 점 xx^*과 active set A(x)A(x^*)에 대해, {gi(x),iA(x)}\{\nabla g_i(x^*), i \in A(x^*)\}이 linearly independent이면, LICQ (Linearly Independence Constraint Qualification)가 성립한다고 말한다.

LICQ 성립 시, active constraint의 gradient는 0이 될 수 없다.

  • The problem can be rewrite as:
minimizef(x)subject tog(x)0h(x)=0\begin{aligned} & \text{minimize} & & f(x) \\ & \text{subject to} & & \mathbf{g}(x) \le 0\\ & & & \mathbf{h}(x) = 0\\ \end{aligned}
  • 주어진 문제의 Lagrangian 은 다음과 같이 정의된다.
L(x,ν)=f(x)+i=1lλigi(x)+j=1mνjhj(x)=f(x)+λTg(x)+νTh(x)\begin{aligned} L(x,\nu) &= f(x) + \sum_{i=1}^l \lambda_i g_i(x) + \sum_{j=1}^m \nu_j h_j(x) \\ &= f(x) + \lambda^T \mathbf{g}(x) + \nu^T \mathbf{h}(x) \end{aligned}

Karush-Kuhn-Tucker (KKT) Conditions

Motivation for the KKT Conditions

하나의 inequality constraint를 가진 optimization problem을 고려하자.

minimizef(x)subject tog(x)0\begin{aligned} & \text{minimize} & & f(x) \\ & \text{subject to} & & g(x) \le 0\\ \end{aligned}

이는 다음과 같이 표현될 수 있다.

minimizefstep(x):={f(x)if g(x)00if g(x)>0=f(x)+1g(x)>0\begin{aligned} \text{minimize} \quad f_{\infty-step}(x) &:= \begin{cases} f(x) &\text{if } g(x)\le 0 \\ 0 &\text{if } g(x)> 0 \end{cases} \\ &= f(x) + \infty \cdot 1_{g(x)>0} \end{aligned}

이 때, fstep=maxλ0f_{\infty-step} = \max\limits_{\lambda \ge 0} L(x,λ)L(x,\lambda) where L(x,λ)=f(x)+λg(x)L(x,\lambda)= f(x) + \lambda g(x).

따라서, 해당 optimization problem은 다음과 같이 새롭게 표현될 수 있다:

minxmaxλ0L(x,λ):=f(x)+λg(x)\min\limits_{x}\max\limits_{\lambda \ge 0}L(x,\lambda) := f(x)+\lambda g(x)

KKT Conditions

Theorem: First-Order Necessary Conditions (KKT conditions)
Suppose that xx^* is a local solution of constrained optimization problem and the LICQ holds at xx^*.

minimizef(x)subject togi(x)0,i=1,,lhj(x)=0,j=1,,m\begin{aligned} & \text{minimize} & & f(x) \\ & \text{subject to} & & g_i(x) \le 0, \quad i=1,\dots,l\\ & & & h_j(x) = 0, \quad j=1,\dots,m\\ \end{aligned}

Then there is a Lagrangian multiplier vector (λ,ν)(\lambda^*, \nu^*), such that the following KKT conditions are satisfied at (x,λ,ν)(x^*, \lambda^*, \nu^*):

(1)xL(x,λ,ν)=xf(x)+i=1lλixgi(x)+j=1mνjxhj(x)=0(2)gi(x)0,i(3)hj(x)=0,j(4)λi0,i(5)λigi(x)=0,i\begin{aligned} &\text{(1)} \quad \nabla_x L(x^*,\lambda^*,\nu^*) = \nabla_x f(x^*) + \sum_{i=1}^l\lambda_i^*\nabla_x g_i(x^*) + \sum_{j=1}^m\nu_j^*\nabla_x h_j(x^*) = 0 \\ &\text{(2)} \quad g_i(x^*) \le 0, \forall i \\ &\text{(3)} \quad h_j(x^*) = 0, \forall j \\ &\text{(4)} \quad \lambda_i^* \ge 0, \forall i \\ &\text{(5)} \quad \lambda_i^* g_i(x^*) = 0, \forall i \end{aligned}

각 조건은 다음과 같이 불린다.

  • (1): Stationarity 조건
  • (2), (3): Primal feasibility 조건
  • (4): Dual feasibility 조건
  • (5): Complementary slackness 조건

Lagrangian Duality

Primal and Dual Problem

  • Primal problem
minimizef(x)subject togi(x)0,i=1,,lhj(x)=0,j=1,,m\begin{aligned} & \text{minimize} & & f(x) \\ & \text{subject to} & & g_i(x) \le 0, \quad i=1,\dots,l\\ & & & h_j(x) = 0, \quad j=1,\dots,m\\ \end{aligned}

or

minxmaxλ0,νL(x,λ,ν):=f(x)+λTg(x)+νTh(x)\min\limits_{x}\max\limits_{\lambda \ge 0, \nu}L(x,\lambda,\nu) := f(x)+\lambda^T g(x)+\nu^T h(x)
  • Lagrangian Dual problem
maxλ0,νD(λ,ν):=minxL(x,λ,ν)\max\limits_{\lambda \ge 0, \nu}D(\lambda,\nu):=\min\limits_{x}L(x,\lambda,\nu)

Duality Theorem

Weak Duality

Dual problem의 optimal value는 primal problem의 optimal value의 lower bound이다.

Theorem: Weak Duality
Let xx and (λ,ν)(\lambda,\nu) be a feasible solution to primal and dual problems, respectively.
Then f(x)D(λ,ν)f(x) \ge D(\lambda,\nu).
Moreover, if f(x)=D(λ,ν)f(x^*)=D(\lambda^*,\nu^*), then xx^* and (λ,ν)(\lambda^*,\nu^*) solves the primal and dual problems, respectively.

  • Duality gap: f(x)D(λ,ν)f(x^*)-D(\lambda^*,\nu^*)

Strong Duality

Convex optimization problem의 경우, dual problem과 primal problem의 optimal value는 같다.

Theorem: Strong Duality
Let f,gif,g_i be convex and hjh_j be affine for all i,ji,j. Then f(x)=D(λ,ν)f(x^*) = D(\lambda^*,\nu^*) if the optimal value is finite.

  • Affine functions f(x1,...,xn)=A1x1+...+Anxn+bf(x_1,...,x_n)=A_1x_1+...+A_nx_n+b 형태의 function.

Wolfe Duality

Strong Duality를 이용하면 주어진 optimization 문제를 다르게 표현할 수 있다.

Theorem: Wolfe Duality
Let f,gif,g_i be convex, hjh_j be affine for all i,ji,j, and xx^* be an optimal solution of the primal.
Then (x,λ,ν)(x^*,\lambda^*,\nu^*) at which LICQ holds solves the Wolfe dual problem of the form

minimizeL(x,λ,ν)subject toxL(x,λ,ν)=0λ0\begin{aligned} & \text{minimize} & & L(x,\lambda,\nu) \\ & \text{subject to} & & \nabla_xL(x,\lambda,\nu)=0\\ & & & \lambda \ge 0\\ \end{aligned}

xL(x,λ,ν)=0\nabla_xL(x,\lambda,\nu)=0L(x,λ,ν)L(x,\lambda,\nu)의 local optima에 대한 조건이다.

Linear and Quadratic Programming

Linear Programming (LP)

minimizecTxsubject toAx=bx0\begin{aligned} & \text{minimize} & & c^Tx \\ & \text{subject to} & & Ax=b\\ & & & x \ge 0\\ \end{aligned}
  • Lagrangian dual L(x,λ,ν)=cTxλTx+νT(bAx)L(x,\lambda,\nu) = c^Tx-\lambda^Tx+\nu^T(b-Ax)은 convex이다.
  • 따라서, cλATν=0c-\lambda-A^T\nu=0 and λ0\lambda\ge 0 일 때, minimum을 얻는다.
    * Check that cλATν=0c-\lambda-A^T\nu=0 and λ0\lambda\ge 0 \Longleftrightarrow ATνcA^T\nu \le c.
  • 그 결과, dual problem은 다음과 같다.
maximizebTνsubject toATνc\begin{aligned} & \text{maximize} & & b^T\nu \\ & \text{subject to} & & A^T\nu \le c\\ \end{aligned}

Quadratic Programming (QP)

minimize12xTHx+dTxsubject toAxb\begin{aligned} & \text{minimize} & & \frac{1}{2}x^THx+d^Tx \\ & \text{subject to} & & Ax \le b\\ \end{aligned}

where HH is symmetric and positive semidefinite. (따라서, objective function은 convex이다.)

  • Lagrangian dual L(x,λ)=12xTHx+dTx+λT(Axb)L(x,\lambda) = \frac{1}{2}x^THx+d^Tx+\lambda^T(Ax-b)은 convex이다.
  • 따라서, Hx+ATλ+d=0Hx+A^T\lambda+d=0 or x=H1(d+ATλ)x=-H^{-1}(d+A^T\lambda) 일 때, minimum을 얻는다.
  • 그 결과, dual problem은 다음과 같다.
maximize12λTDλ+λTc12dTH1dsubject toλ0\begin{aligned} & \text{maximize} & & \frac{1}{2}\lambda^TD\lambda+\lambda^Tc-\frac{1}{2}d^TH^{-1}d \\ & \text{subject to} & & \lambda \ge 0\\ \end{aligned}

where D=AH1AD=-AH^{-1}A and c=bAH1dc=-b-AH^{-1}d.

이 dual problem은 단순히 nonnegative domain에서의 concave quadratic function maximization 문제이기에, 상대적으로 쉽게 풀 수 있다.

profile
공부랑 연구랑 생각

0개의 댓글