MATH-21 · OPTIMIZATION

경사하강법·조건수·수렴 진단Gradient descent, conditioning and convergence diagnostics

정확한 이차 반복에서 가정별 보장과 실제 손실의 좌표 실험까지From exact quadratic recurrences to conditional guarantees and actual-loss coordinate experiments

실습 6종 · 풀이 포함 연습문제 51개6 labs · 51 exercises with solutions

기초Foundations

1. 답의 조건에서 답을 찾는 반복으로1. From optimality conditions to an iterative search

최소점의 기울기가 0이라는 조건을 알아도 복잡한 식에서 그 점을 바로 풀기 어려울 수 있습니다. 경사하강법은 현재 위치의 기울기를 계산하고 조금 내려간 뒤 다시 기울기를 보는 방법입니다. 큰 지도를 한 번에 푸는 대신 작은 이동을 반복합니다.

하지만 ‘내려가는 쪽’과 ‘얼마나 갈지’는 다른 질문입니다. 너무 큰 보폭은 반대편 높은 곳으로 넘어가고, 너무 작은 보폭은 오랫동안 제자리처럼 보입니다. 이번 장은 정확히 풀 수 있는 이차함수에서 시작해 보폭·조건수·수렴 보장·종료 판단을 연결합니다.

Knowing that an optimum has zero gradient does not necessarily let us solve for it directly. Gradient descent computes a local gradient, takes a step, and repeats.

A descending direction does not specify a safe distance. Large steps can overshoot; tiny ones can appear stalled. Begin with exactly solvable quadratics, then connect step size, conditioning, convergence guarantees and stopping decisions.

기초Foundations

2. 현재점의 기울기로 다음 점을 계산2. Compute the next point from the current gradient

시작점 x₀, 양의 보폭 η를 정합니다. k번째 점의 기울기를 구하고 그 반대 방향으로 η배 이동합니다. 아래첨자 k는 관측 시각이 아니라 계산 반복 횟수입니다.

xk+1=xk−η∇f(xk),k=0,1,2,…,η>0x_{k+1}=x_k-\eta\nabla f(x_k),\qquad k=0,1,2,\ldots,\quad\eta>0

예를 들어 f(x)=½x², x₀=4, η=1/2이면 기울기는 x이고 4→2→1→1/2로 갑니다. 실제 자료가 주어져도 반복 중 바뀌는 것은 보통 적합 계수입니다. 자료 자체의 미래가 이 수열대로 움직인다는 뜻이 아닙니다.

기울기는 반드시 현재점에서 새로 계산합니다. x₀의 기울기만 계속 쓰면 일정 방향으로 직선 이동하는 다른 방법입니다. 이 장은 전체 자료로 정의한 정확한 목적함수 기울기를 쓰며, 표본별 잡음이 있는 확률적 경사하강법은 별도 과목에서 다룹니다.

Choose an initial point and positive step size. Each iteration recomputes the gradient at the current point and subtracts its scaled value. The index k counts calculations, not observation times.

xk+1=xk−η∇f(xk),k=0,1,2,…,η>0x_{k+1}=x_k-\eta\nabla f(x_k),\qquad k=0,1,2,\ldots,\quad\eta>0

For ½x² starting at four with η=1/2, the sequence is 4,2,1,1/2. With actual data, these are typically parameter updates, not a prediction that observed data will evolve in that sequence.

Recompute the current gradient. Reusing only the initial gradient defines a different procedure. We study deterministic full-objective gradients; stochastic sampling is introduced later.

기초Foundations

3. 음의 기울기가 국소적으로 내려가는 이유3. Why the negative gradient is locally descending

g=∇f(x)≠0일 때 방향 d=−g의 방향미분은 gᵀd=−‖g‖²<0입니다. 전미분의 정의에서 충분히 작은 양수 η에 대해 f(x−ηg)<f(x)가 됩니다. 이 말은 모든 크기의 η가 안전하다는 뜻이 아닙니다.

f(x−ηg)=f(x)−η∥g∥2+o(η),g≠0f(x-\eta g)=f(x)-\eta\|g\|^2+o(\eta),\qquad g\ne0

유클리드 길이가 1인 방향 중 가장 급한 하강방향은 −g/‖g‖입니다. 실제 경사하강법은 단위방향 대신 −g를 사용하므로 이동 길이는 η‖g‖입니다. 기울기가 작아지면 같은 η에서도 이동이 작아집니다.

g=0이면 정규화 방향은 정의되지 않고 보통 알고리즘은 멈춥니다. 그러나 앞 장에서 보았듯 그 점이 최소인지 최대인지 안장인지 별도 판단이 필요합니다. ‘급한 방향’도 노름·좌표의 선택에 의존한다는 점을 뒤에서 다시 봅니다.

For nonzero g=∇f(x), the directional derivative along −g is −‖g‖²<0. Differentiability therefore guarantees decrease for sufficiently small positive steps, not arbitrary steps.

f(x−ηg)=f(x)−η∥g∥2+o(η),g≠0f(x-\eta g)=f(x)-\eta\|g\|^2+o(\eta),\qquad g\ne0

The steepest unit Euclidean direction is −g/‖g‖, while gradient descent uses −g and moves distance η‖g‖. A fixed step size does not mean a fixed movement distance.

At zero gradient the normalized direction is undefined and the method normally stops, but classification remains separate. Steepest directions also depend on the chosen geometry.

기초Foundations

4. 선형근사에 이동 비용을 붙이면 같은 업데이트4. A regularized local linear model gives the same update

선형근사 f(x)+gᵀd만 최소화하면 g≠0일 때 d가 무한히 멀리 달아납니다. ‘현재 근처에서만 믿을 수 있다’는 정보를 이동 제곱 비용으로 보완해 봅시다.

min⁡d{gTd+12η∥d∥2},η>0,d⋆=−ηg\min_d\left\{g^{\mathsf T}d+\frac1{2\eta}\|d\|^2\right\},\quad\eta>0,\qquad d^\star=-\eta g

미분하면 g+d/η=0이고, 양의 정부호 헤시안 I/η 때문에 유일한 전역 최소입니다. η가 작을수록 이동 비용이 커져 짧게 움직입니다. 이것은 보폭을 국소 모형의 신뢰 범위와 연결하는 한 해석입니다.

이 국소 모형의 최소가 원래 f의 실제 감소를 보장하려면 나머지항을 통제해야 합니다. 다음 절의 스칼라 실험과 8~10절의 매끄러움 조건이 그 역할을 합니다. 원래 목적함수와 국소 모형을 같은 함수라고 부르지 않습니다.

Minimizing the linear approximation alone is unbounded when the gradient is nonzero. Add a quadratic movement cost to keep the local step controlled.

min⁡d{gTd+12η∥d∥2},η>0,d⋆=−ηg\min_d\left\{g^{\mathsf T}d+\frac1{2\eta}\|d\|^2\right\},\quad\eta>0,\qquad d^\star=-\eta g

Differentiation gives the unique minimizer −ηg. Smaller η penalizes movement more strongly.

This explains the update, but decrease of the true objective still requires remainder control. The local model and the original function are different objects.

기초Foundations

5. 스칼라 실습: 반복식을 정확히 풀 수 있는 출발점5. Scalar lab: an exactly solvable recurrence

가정함수 f(x)=½ax², a>0은 기울기 ax와 최소점 0을 갖습니다. 반복은 xₖ₊₁=(1−ηa)xₖ이므로 매번 같은 수를 곱하는 등비수열입니다.

xk=(1−ηa)kx0,f(xk)=a2(1−ηa)2kx02x_k=(1-\eta a)^k x_0,\qquad f(x_k)=\frac a2(1-\eta a)^{2k}x_0^2

a=2,η=1/4,x₀=4이면 xₖ=(1/2)ᵏ·4입니다. η=1/2이면 한 번에 0으로 갑니다. 인자가 0이면 k=0에서는 주어진 초기값, k≥1에서는 0으로 따로 읽으므로 0⁰을 계산할 필요가 없습니다. 이것은 곡률 a를 정확히 아는 이차함수의 특별한 결과이지 일반 함수에 ‘한 번에 푸는 보폭’이 있다는 뜻은 아닙니다.

실습에서 x의 부호와 f의 값을 따로 확인하세요. 곱하는 수가 음수이면 위치가 좌우로 흔들려도 절댓값과 함수값은 줄 수 있습니다. 그래프의 움직임이 왕복한다고 곧바로 발산이라고 판단하지 않습니다.

For the hypothetical f=½ax² with a>0, the iteration multiplies x by 1−ηa each time, giving an exact geometric sequence.

xk=(1−ηa)kx0,f(xk)=a2(1−ηa)2kx02x_k=(1-\eta a)^k x_0,\qquad f(x_k)=\frac a2(1-\eta a)^{2k}x_0^2

With a=2,η=1/4,x₀=4, the factor is 1/2. Choosing η=1/a solves this special quadratic in one step. For factor zero, treat k=0 as the specified initial value and k≥1 as zero, without evaluating 0⁰.

Track parameter signs and objective values separately. A negative factor can alternate positions while their magnitudes and function values decrease.

기초Foundations

6. 수렴·진동·발산을 결정하는 숫자 하나6. One factor determines convergence, cycling or divergence

x₀≠0이면 |1−ηa|<1, 즉 0<η<2/a일 때 0으로 수렴합니다. 0<ηa<1이면 같은 쪽에서 접근하고, 1<ηa<2이면 양쪽을 번갈아 접근합니다. ηa=1은 한 번에 도착하는 경우입니다.

ηa=2: xk=(−1)kx0;ηa>2: ∣xk∣→∞(x0≠0)\eta a=2:\ x_k=(-1)^k x_0;\qquad \eta a>2:\ |x_k|\to\infty\quad(x_0\ne0)

η=0이면 전혀 움직이지 않습니다. ηa=2이면 위치는 두 점을 왕복하고 함수값은 일정하여 최소로 수렴하지 않습니다. ηa>2이면 절댓값과 손실이 커집니다.

예외 x₀=0은 어떤 유한 η에서도 계속 0입니다. 그래서 한 시작점에서 잘 작동했다는 실험으로 보폭의 전체 안정성을 증명할 수 없습니다. 안정성 조건은 어떤 시작점·방향에 대해 주장하는지 포함해야 합니다.

For nonzero initial x, convergence requires |1−ηa|<1, or 0<η<2/a. Factors between zero and one approach from one side; negative factors of magnitude below one alternate while converging.

ηa=2: xk=(−1)kx0;ηa>2: ∣xk∣→∞(x0≠0)\eta a=2:\ x_k=(-1)^k x_0;\qquad \eta a>2:\ |x_k|\to\infty\quad(x_0\ne0)

Zero step size stalls. The boundary ηa=2 cycles with constant objective; larger steps diverge.

The exception x₀=0 remains fixed for any finite step. Success from one special start does not prove stability for all starts and directions.

기초Foundations

7. 위치 오차·함수값 오차·기울기는 서로 다른 양7. Parameter error, objective error and gradient are different quantities

스칼라 이차함수에서 위치 오차는 |xₖ|, 함수값 오차는 axₖ²/2, 기울기 크기는 a|xₖ|입니다. 위치가 매번 1/2배면 함수값 오차는 1/4배입니다. 두 그래프에 같은 수렴율 숫자를 붙이지 마세요.

∣xk−x⋆∣=∣r∣k∣x0∣,f(xk)−f⋆=r2kf(x0),r=1−ηa|x_k-x^\star|=|r|^k|x_0|,\quad f(x_k)-f^\star=r^{2k}f(x_0),\quad r=1-\eta a

단위도 다릅니다. 입력의 단위가 m, 목적함수가 비용이면 위치 오차는 m, 함수값 오차는 비용, 기울기는 비용/m입니다. 실제 여러 계수의 단위가 다를 때는 어떤 좌표에서 유클리드 노름을 쓰는지 먼저 정합니다.

진짜 최적값을 모르는 문제에서는 함수값 오차를 직접 그릴 수 없기도 합니다. 그때 현재 함수값, 기울기, 이동량, 허용오차를 기록하되 알려지지 않은 최적값을 0이라고 임의 가정하지 않습니다.

For the scalar quadratic, parameter error is |xₖ|, objective error is axₖ²/2 and gradient norm is a|xₖ|. Halving the parameter error quarters the objective error.

∣xk−x⋆∣=∣r∣k∣x0∣,f(xk)−f⋆=r2kf(x0),r=1−ηa|x_k-x^\star|=|r|^k|x_0|,\quad f(x_k)-f^\star=r^{2k}f(x_0),\quad r=1-\eta a

Their units also differ. Specify coordinates before taking norms across heterogeneous parameters.

When the true optimal value is unknown, objective error may not be directly available. Record observable diagnostics without arbitrarily declaring the unknown optimum to be zero.

기초Foundations

8. L-매끄러움은 기울기의 변화 속도 제한8. L-smoothness bounds changes of the gradient

미분 가능하다는 말만으로 일정한 보폭의 안전 범위가 정해지지는 않습니다. 이 장에서 L-매끄러움은 기울기의 차이가 입력 차이의 L배를 넘지 않는다는 조건입니다. 기본 보장에서는 f가 실수 공간 전체에 정의되고 L>0이라고 합니다.

∥∇f(x)−∇f(y)∥≤L∥x−y∥for every x,y∈Rn\|\nabla f(x)-\nabla f(y)\|\le L\|x-y\|\qquad\text{for every }x,y\in\mathbb R^n

C² 함수에서 헤시안의 모든 고유값 절댓값이 영역 전체에서 L 이하이면 이 조건을 얻습니다. 볼록함수에서는 0≤H≤LI이고, 비볼록에서는 음의 곡률도 있어 −LI≤H≤LI를 봅니다.

x⁴는 무한히 매끄러운 다항식이지만 f″=12x²가 실수 전체에서 유계가 아니므로 어떤 유한 L로도 전체 L-매끄럽지는 않습니다. 일상어의 ‘매끄럽다’와 최적화의 정량적 L-매끄러움은 다른 말입니다.

Differentiability alone does not provide a uniform safe step. L-smoothness bounds gradient differences by L times input distance. Basic global guarantees here use f on all Euclidean space and L>0.

∥∇f(x)−∇f(y)∥≤L∥x−y∥for every x,y∈Rn\|\nabla f(x)-\nabla f(y)\|\le L\|x-y\|\qquad\text{for every }x,y\in\mathbb R^n

For C² functions, uniformly bounding absolute Hessian eigenvalues by L suffices. Negative curvature must also be bounded for nonconvex functions.

The polynomial x⁴ is infinitely differentiable yet not globally L-smooth for any finite L because 12x² is unbounded. Qualitative smoothness and quantitative L-smoothness differ.

학부 연결 · 선택Undergraduate bridge · optional

9. 선분 적분으로 이차 위 지지대를 유도9. A segment integral gives a quadratic upper model

d=y−x라 두고 x에서 y로 가는 선분을 적분합니다. 함수값 차이에서 현재 기울기의 선형항을 빼면 기울기 변화의 적분입니다. Cauchy–Schwarz와 L-매끄러움으로 각 적분값을 Lt‖d‖²로 제한합니다.

f(y)−f(x)−∇f(x)Td=∫01[∇f(x+td)−∇f(x)]Td dt≤L2∥d∥2f(y)-f(x)-\nabla f(x)^{\mathsf T}d=\int_0^1[\nabla f(x+td)-\nabla f(x)]^{\mathsf T}d\,dt\le\frac L2\|d\|^2

이는 선형근사의 나머지에 이차 상계를 준 것입니다. 미분 가능한 볼록함수의 접평면이 아래 지지대였던 것과 달리 여기서는 곡률 상한을 이용한 위 지지대입니다. 두 부등식은 각각 다른 가정에서 옵니다.

벡터 기울기 차이를 일반적으로 ‘어떤 한 점의 헤시안×입력 차이’라고 단정하지 않습니다. 모든 성분에 같은 평균값정리 점이 있을 필요가 없기 때문입니다. 선분 적분은 이 문제 없이 정확한 등식을 줍니다.

Integrate along the segment d=y−x, subtract the current linear term, and bound the remaining gradient changes with Cauchy–Schwarz and L-smoothness.

f(y)−f(x)−∇f(x)Td=∫01[∇f(x+td)−∇f(x)]Td dt≤L2∥d∥2f(y)-f(x)-\nabla f(x)^{\mathsf T}d=\int_0^1[\nabla f(x+td)-\nabla f(x)]^{\mathsf T}d\,dt\le\frac L2\|d\|^2

This controls the linearization remainder from above. Convexity's supporting tangent controls it from below under different assumptions.

A vector gradient difference need not equal one single intermediate Hessian times the displacement. The segment integral avoids that invalid general mean-value shortcut.

기초Foundations

10. 보폭을 대입하면 실제 감소량 상계10. Substitute the update to obtain a descent guarantee

위 지지대에 d=−ηg를 넣으면 첫 항은 −η‖g‖²이고 이차 비용은 Lη²‖g‖²/2입니다. 둘을 합치면 다음 감소 부등식입니다.

f(xk+1)≤f(xk)−η(1−Lη2)∥∇f(xk)∥2f(x_{k+1})\le f(x_k)-\eta\left(1-\frac{L\eta}{2}\right)\|\nabla f(x_k)\|^2

0<η<2/L이면 기울기가 0이 아닌 곳에서 엄격히 감소합니다. 0<η≤1/L이면 괄호가 1/2 이상이어서 f다음≤f현재−η‖g‖²/2라는 간단한 보장을 씁니다.

η=2/L에서는 위 식이 감소를 보장하지 않습니다. 스칼라 곡률 L의 이차함수는 정확히 왕복하는 반례입니다. 또 L을 실제 상한보다 작게 추정하면 이론의 안전 보폭이 실제로는 너무 클 수 있습니다.

Substitute d=−ηg into the quadratic upper model. The linear benefit and quadratic cost combine into a descent bound.

f(xk+1)≤f(xk)−η(1−Lη2)∥∇f(xk)∥2f(x_{k+1})\le f(x_k)-\eta\left(1-\frac{L\eta}{2}\right)\|\nabla f(x_k)\|^2

Positive steps below 2/L strictly decrease at nonstationary points. For η≤1/L the simpler decrease η‖g‖²/2 is guaranteed.

The endpoint 2/L gives no strict-decrease guarantee; a scalar quadratic cycles there. Underestimating the true smoothness constant can make a supposedly safe step too large.

학부 연결 · 선택Undergraduate bridge · optional

11. 아래로 유계라면 기울기 제곱의 합이 제한된다11. A lower bound controls the sum of squared gradients

f가 실수 공간 전체에서 L-매끄럽고 아래로 유계이며, 고정 보폭 0<η≤1/L이라고 합시다. 유한한 하한 f_low를 알고 있다고 하면 감소 부등식을 k번 더해 중간 함수값을 소거합니다.

η2∑j=0k−1∥∇f(xj)∥2≤f(x0)−f(xk)≤f(x0)−flow\frac\eta2\sum_{j=0}^{k-1}\|\nabla f(x_j)\|^2\le f(x_0)-f(x_k)\le f(x_0)-f_{\rm low}

오른쪽이 반복 횟수와 무관하게 유한하므로 무한히 더해도 기울기 제곱의 합이 제한됩니다. 따라서 기울기 크기는 0으로 갑니다. 볼록성은 이 논증에 필요하지 않았습니다.

그러나 ‘기울기가 0으로 감’은 ‘전역 최소로 감’과 다릅니다. 정지 최대·안장도 기울기 0입니다. 이 보장은 기울기에 대한 것이고, 좌표 수열의 수렴이나 최적값의 달성을 별도로 증명하지 않았습니다.

Assume global L-smoothness, a finite lower bound f_low and fixed 0<η≤1/L. Sum the descent inequalities and telescope the objective values.

η2∑j=0k−1∥∇f(xj)∥2≤f(x0)−f(xk)≤f(x0)−flow\frac\eta2\sum_{j=0}^{k-1}\|\nabla f(x_j)\|^2\le f(x_0)-f(x_k)\le f(x_0)-f_{\rm low}

The sum of nonnegative squared gradients stays bounded, so gradient norms tend to zero. No convexity was needed.

This does not establish global optimality, iterate convergence or attained optimal values. Maxima and saddles can also have zero gradient.

학부 연결 · 선택Undergraduate bridge · optional

12. 몇 번 안에 작은 기울기를 만날까?12. How many iterations guarantee encountering a small gradient?

k개의 비음수 숫자 중 가장 작은 것은 평균보다 크지 않습니다. 앞 절의 합 상계에서 바로 다음 유한 반복 보장을 얻습니다. k≥1입니다.

min⁡0≤j<k∥∇f(xj)∥2≤2(f(x0)−flow)ηk\min_{0\le j<k}\|\nabla f(x_j)\|^2\le\frac{2(f(x_0)-f_{\rm low})}{\eta k}

기울기 크기를 ε 이하로 만들고 싶으면 k≥2(f(x₀)−f_low)/(ηε²)인 정수 반복 수가 충분합니다. 이것은 처음 k개 중 적어도 하나에 대한 보장입니다. 마지막 점의 기울기가 반드시 그 상계를 만족한다고 문장을 바꾸지 않습니다.

예를 들어 f(x₀)−f_low≤10,η=0.1,ε=0.5이면 k≥800이 충분합니다. 실제로 800번이 꼭 필요하다는 뜻은 아닙니다. 보수적인 최악 경우 상계와 실제 관찰한 도달 횟수는 다릅니다.

The smallest of k nonnegative values is no greater than their average. The telescoping bound therefore gives a finite-iteration guarantee for k≥1.

min⁡0≤j<k∥∇f(xj)∥2≤2(f(x0)−flow)ηk\min_{0\le j<k}\|\nabla f(x_j)\|^2\le\frac{2(f(x_0)-f_{\rm low})}{\eta k}

A sufficient count for encountering gradient norm at most ε is k≥2(f(x₀)−f_low)/(ηε²). This concerns at least one of the first k points, not automatically the last point.

If the initial lower-bound gap is at most ten, η=0.1 and ε=0.5, then 800 iterations suffice. This worst-case upper bound is not a claim that 800 are necessary.

학부 연결 · 선택Undergraduate bridge · optional

13. 기울기 0 접근이 좌표의 유한한 극한을 만들지는 않는다13. Small gradients need not give a finite iterate limit

f(x)=ln(1+eˣ)는 아래로 0에 유계이고 기울기 σ(x)=eˣ/(1+eˣ), 이계 미분 σ(1−σ)≤1/4입니다. 따라서 실수 전체에서 L=1/4로 매끄럽습니다. 그러나 값 0은 어떤 유한 x에서도 얻지 못합니다.

xk+1=xk−ησ(xk)<xk,inf⁡Rf=0 is not attainedx_{k+1}=x_k-\eta\sigma(x_k)<x_k,\qquad \inf_{\mathbb R}f=0\text{ is not attained}

η>0에서 수열은 엄격히 감소합니다. 유한한 극한 a가 있다면 이동량이 −ησ(a)<0에 접근해 0으로 가지 않으므로 모순입니다. 따라서 xₖ→−∞이고 기울기와 함수값은 0으로 갑니다. 안전한 고정 보폭에서도 유한한 최적점으로 좌표가 수렴한 것은 아닙니다.

반대로 반복점들이 유계이고 그 부분수열이 a로 수렴한다면, 연속인 기울기와 ‖∇f(xₖ)‖→0에서 ∇f(a)=0을 얻습니다. 이것도 부분극한의 정상성이지 유일한 전역 최소를 자동 보장하는 문장은 아닙니다.

The softplus f=ln(1+eˣ) has positive logistic gradient and second derivative at most 1/4. It is globally L-smooth with L=1/4 and has unattained infimum zero.

xk+1=xk−ησ(xk)<xk,inf⁡Rf=0 is not attainedx_{k+1}=x_k-\eta\sigma(x_k)<x_k,\qquad \inf_{\mathbb R}f=0\text{ is not attained}

The iterates strictly decrease. A finite limit a would force increments toward −ησ(a)<0 instead of zero, a contradiction. Thus they tend to negative infinity while gradients and values approach zero, including under safe positive steps.

If iterates instead have a convergent subsequence and gradient norms vanish, continuity makes that limit stationary. It still does not automatically give a unique global optimum.

기초Foundations

14. 볼록성과 최소 달성을 더하면 함수값 오차 O(1/k)14. Convexity and an attained minimum give an O(1/k) objective bound

이제 f가 실수 공간 전체에서 볼록하고 L-매끄러우며 최소점 x*가 실제로 있다고 합시다. 고정 보폭 0<η≤1/L에서 k≥1이면 다음 보장을 얻습니다.

f(xk)−f⋆≤∥x0−x⋆∥22ηkf(x_k)-f^\star\le\frac{\|x_0-x^\star\|^2}{2\eta k}

오차 상계가 k에 반비례하여 줄어드는 것을 O(1/k)라고 부릅니다. k를 두 배로 하면 이 보증 상계가 절반입니다. 실제 오차가 반드시 매번 이 식과 정확히 같다는 뜻이 아닙니다.

앞의 비볼록 보장은 최소 기울기 제곱에 관한 것이었고, 이번 보장은 마지막 점의 함수값 오차에 관한 것입니다. 최소점이 여러 개이면 어떤 x*를 골라도 그 점까지 초기 거리로 상계를 쓸 수 있습니다. 유일성은 가정하지 않습니다.

Now assume convexity, global L-smoothness and an attained minimizer x*. With fixed 0<η≤1/L and k≥1, objective error satisfies the displayed bound.

f(xk)−f⋆≤∥x0−x⋆∥22ηkf(x_k)-f^\star\le\frac{\|x_0-x^\star\|^2}{2\eta k}

The O(1/k) statement is an upper bound proportional to the reciprocal iteration count, not an exact error trajectory.

Unlike the nonconvex small-gradient guarantee, this bounds the last point's objective suboptimality. Uniqueness is unnecessary; any attained minimizer can be used in the initial distance.

선택 심화Optional extension

15. 거리 제곱을 전개하면 함수값 오차가 합으로 묶인다15. Expanding squared distances yields the convex rate

Dₖ=‖xₖ−x*‖²라 두고 업데이트를 제곱 전개합니다. 볼록 접평면 부등식에서 gₖᵀ(xₖ−x*)≥f(xₖ)−f*이고, 감소 부등식에서 η²‖gₖ‖²≤2η(f(xₖ)−f(xₖ₊₁))입니다.

Dk+1≤Dk−2η(f(xk)−f⋆)+η2∥gk∥2≤Dk−2η(f(xk+1)−f⋆)D_{k+1}\le D_k-2\eta(f(x_k)-f^\star)+\eta^2\|g_k\|^2\le D_k-2\eta(f(x_{k+1})-f^\star)

j=0,…,k−1에 대해 더하면 2ηΣⱼ₌₁ᵏ(f(xⱼ)−f*)≤D₀−Dₖ≤D₀입니다. 함수값이 감소하므로 마지막 오차는 각 앞선 오차 이하이고 합은 k배의 마지막 오차 이상입니다. 이것이 앞 절의 상계입니다.

증명에서 볼록성·보폭·최소점 존재가 각각 어디 쓰였는지 표시해 보세요. 함수값 감소만으로는 x*와의 거리 부등식이 생기지 않습니다. 필요한 가정을 하나씩 더해 더 강한 결론을 얻었습니다.

Let Dₖ=‖xₖ−x*‖². Expand the update, use convex support to bound gₖᵀ(xₖ−x*) below by objective error, and use descent to control the squared-gradient term.

Dk+1≤Dk−2η(f(xk)−f⋆)+η2∥gk∥2≤Dk−2η(f(xk+1)−f⋆)D_{k+1}\le D_k-2\eta(f(x_k)-f^\star)+\eta^2\|g_k\|^2\le D_k-2\eta(f(x_{k+1})-f^\star)

Summing telescopes distances. Monotonicity makes the sum of the first k objective errors at least k times the last error, proving the bound.

Track where convexity, the step restriction and existence of x* enter. Descent alone does not supply the same distance argument.

학부 연결 · 선택Undergraduate bridge · optional

16. 강볼록성은 기울기와 함수값 오차를 연결16. Strong convexity connects gradient size to objective error

μ-강볼록함수의 아래 지지대에서 y를 자유롭게 움직여 이차식을 최소화합니다. 그 최솟값은 f(x)−‖g‖²/(2μ)이므로 실제 최적값은 그 아래 지지대의 최솟값보다 작을 수 없습니다.

f⋆≥f(x)−∥∇f(x)∥22μ,∥∇f(x)∥2≥2μ(f(x)−f⋆)f^\star\ge f(x)-\frac{\|\nabla f(x)\|^2}{2\mu},\qquad \|\nabla f(x)\|^2\ge2\mu(f(x)-f^\star)

즉 강볼록성 아래에서는 작은 기울기가 작은 함수값 오차를 인증합니다. 이 부등식은 강볼록성에서 따라오며, 이와 비슷한 기울기 지배 조건이 강볼록하지 않은 함수에도 성립할 수 있지만 여기서는 그 더 넓은 이론을 요구하지 않습니다.

실수 공간 전체의 미분 가능한 강볼록함수는 강제적이어서 유일한 최소가 존재합니다. 제한된 열린 영역에서는 앞 장처럼 달성 문제가 생길 수 있으므로 이 절은 전체 공간이라는 범위를 유지합니다.

Minimize the strongly convex quadratic lower model over y. Its minimum is f(x)−‖g‖²/(2μ), which bounds the true optimal value from below.

f⋆≥f(x)−∥∇f(x)∥22μ,∥∇f(x)∥2≥2μ(f(x)−f⋆)f^\star\ge f(x)-\frac{\|\nabla f(x)\|^2}{2\mu},\qquad \|\nabla f(x)\|^2\ge2\mu(f(x)-f^\star)

Thus a small gradient certifies small objective error under strong convexity. Broader gradient-dominance conditions exist, but are not assumed here.

We retain the whole-space setting: differentiable strong convexity there gives coercivity and a unique attained minimum. Restricted open domains need separate attainment checks.

기초Foundations

17. 강볼록·매끄러운 경우에는 기하급수적 함수값 보장17. Strong convexity and smoothness give a geometric objective guarantee

μ-강볼록·L-매끄러운 함수에서 0<η≤1/L을 택합니다. 감소량 η‖g‖²/2에 앞 절의 기울기 하한을 넣으면 오차가 매번 1−ημ배 이하가 됩니다.

f(xk)−f⋆≤(1−ημ)k[f(x0)−f⋆],0<μ≤L,0<η≤1/Lf(x_k)-f^\star\le(1-\eta\mu)^k[f(x_0)-f^\star],\qquad 0<\mu\le L,\quad0<\eta\le1/L

0≤1−ημ<1이므로 기하급수적으로 줄어듭니다. 수치해석에서는 이런 보장을 선형 수렴이라고 부릅니다. 오차 자체가 직선처럼 줄어든다는 뜻이 아니라, 양수 오차 상계의 로그가 반복 수에 대한 직선이 됩니다. ημ=1인 특별한 경우는 k=0의 초기값을 따로 두고 k≥1부터 gap 0으로 읽어 0⁰이나 log 0을 요구하지 않습니다.

또 강볼록성에서 ‖xₖ−x*‖²≤2(f(xₖ)−f*)/μ로 위치를 제어할 수 있습니다. 이 보수적인 함수값 상계와 다음 절의 이차함수 정확한 고유방향 수렴율은 구별합니다. 같은 ‘선형’이라는 말에도 어떤 오차를 측정하는지 써야 합니다.

Combine the descent bound with gradient dominance for a μ-strongly convex, L-smooth function and fixed 0<η≤1/L.

f(xk)−f⋆≤(1−ημ)k[f(x0)−f⋆],0<μ≤L,0<η≤1/Lf(x_k)-f^\star\le(1-\eta\mu)^k[f(x_0)-f^\star],\qquad 0<\mu\le L,\quad0<\eta\le1/L

This geometric decrease is called linear convergence in numerical analysis: the logarithm of a positive error bound is linear in the iteration count. For factor zero, retain the initial value at k=0 and read zero gap for k≥1, without evaluating 0⁰ or log zero.

Strong convexity also bounds squared parameter distance by 2 times objective error divided by μ. Distinguish this general conservative bound from the exact quadratic eigendirection factors that follow.

학부 연결 · 선택Undergraduate bridge · optional

18. 이차함수의 오차는 고유방향마다 다른 수를 곱한다18. Quadratic errors multiply differently along each eigendirection

f(x)=f*+½(x−x*)ᵀH(x−x*)이고 H가 대칭 양의 정부호라고 합시다. 오차 eₖ=xₖ−x*의 반복은 eₖ₊₁=(I−ηH)eₖ입니다. H=QΛQᵀ로 대각화하면 고유좌표 zₖ=Qᵀeₖ가 서로 분리됩니다.

zk+1,i=(1−ηλi)zk,i,zk,i=(1−ηλi)kz0,iz_{k+1,i}=(1-\eta\lambda_i)z_{k,i},\qquad z_{k,i}=(1-\eta\lambda_i)^kz_{0,i}

가장 큰 곡률 L의 방향은 큰 보폭을 제한하고, 작은 곡률 μ의 방향은 작은 보폭에서 천천히 줄어듭니다. 모든 시작점에서 수렴하는 조건은 0<η<2/L입니다.

어떤 고유방향의 초기 성분이 0이면 그 방향의 불안정성을 실험에서 못 볼 수 있습니다. 양의 정부호 대신 준정부호이면 영 고유방향 성분은 그대로 남으며 최소점이 여러 개일 수 있습니다. 이 절의 조건수 μ>0 가정과 구별하세요.

For a quadratic with symmetric positive definite H, parameter error follows eₖ₊₁=(I−ηH)eₖ. Orthogonal eigencoordinates separate it into scalar recurrences.

zk+1,i=(1−ηλi)zk,i,zk,i=(1−ηλi)kz0,iz_{k+1,i}=(1-\eta\lambda_i)z_{k,i},\qquad z_{k,i}=(1-\eta\lambda_i)^kz_{0,i}

Large curvature limits the step, while small curvature can slow progress. Convergence from every start requires 0<η<2/L.

An absent initial eigendirection can conceal instability. For merely semidefinite H, zero-eigenvalue components remain unchanged and minimizers may be nonunique; our condition-number discussion assumes μ>0.

기초Foundations

19. 이차 실습: 좁은 골짜기와 지그재그19. Quadratic lab: narrow valleys and zigzags

먼저 회전각 0의 가정 이차함수 f=½(x₁²+κx₂²),κ≥1을 봅시다. 고유값은 1과 κ입니다. κ=4,η=1/4이면 x₂ 성분은 한 번에 0이 되지만 x₁은 매번 3/4배라 느리게 줄어듭니다. η를 키우면 x₂가 번갈아 움직일 수 있습니다.

xk+1,1=(1−η)xk,1,xk+1,2=(1−ηκ)xk,2x_{k+1,1}=(1-\eta)x_{k,1},\qquad x_{k+1,2}=(1-\eta\kappa)x_{k,2}

실습에서는 이 이차식을 직교 회전하여 H=R diag(1,κ)Rᵀ로 바꿀 수 있습니다. 회전해도 고유값은 보존되며, 위 성분 공식은 고유좌표 Rᵀx에 적용됩니다. 회전각 0일 때 좌표축이 고유방향입니다. 표시 좌표와 고유좌표의 반복값을 함께 읽으세요.

κ가 크면 등고선이 길쭉해집니다. 그림의 가로·세로 비율도 시각에 영향을 주므로 모양만으로 판단하지 말고 H와 고유값을 확인하세요. 지그재그의 존재와 수렴 여부는 별개이며 곱셈 인자의 절댓값이 핵심입니다.

Start at rotation angle zero with ½(x₁²+κx₂²),κ≥1. Eigenvalues are one and κ. At κ=4,η=1/4, the second coordinate vanishes in one step while the first shrinks by 3/4.

xk+1,1=(1−η)xk,1,xk+1,2=(1−ηκ)xk,2x_{k+1,1}=(1-\eta)x_{k,1},\qquad x_{k+1,2}=(1-\eta\kappa)x_{k,2}

The lab can rotate this quadratic to H=R diag(1,κ)Rᵀ. Eigenvalues are preserved, and the component formulas apply in eigencoordinates Rᵀx. At angle zero, coordinate axes are eigendirections. Compare displayed coordinates with eigencomponents.

Large κ creates elongated level sets, but plot aspect ratio can also change their appearance. Use the matrix and eigenvalues, not appearance alone. Zigzag motion can still converge.

학부 연결 · 선택Undergraduate bridge · optional

20. 고정 보폭의 최악 방향을 균형 맞추기20. Balance the worst eigendirection with an optimal fixed step

양의 정부호 이차함수에서 모든 방향 오차의 한 단계 최악 축소율은 ρ(η)=maxᵢ|1−ηλᵢ|입니다. 최소·최대 고유값 μ,L 사이의 끝점 두 값을 균형 맞추면 최적 고정 보폭을 얻습니다.

ηfixed⋆=2L+μ,ρ⋆=L−μL+μ,∥ek∥≤(ρ⋆)k∥e0∥\eta_{\rm fixed}^\star=\frac2{L+\mu},\qquad \rho^\star=\frac{L-\mu}{L+\mu},\qquad \|e_k\|\le(\rho^\star)^k\|e_0\|

η*에서 낮은 곡률 방향의 인자는 +ρ, 높은 방향은 −ρ입니다. 함수값 오차는 고유좌표의 가중 제곱합이므로 ρ²ᵏ배 이하입니다. μ=L이면 ρ=0이라 한 번에 도착합니다. 이때 k=0은 주어진 초기값이고 k≥1부터 오차가 0이므로 0⁰을 평가하지 않습니다.

이 ‘최적’은 스펙트럼의 모든 방향에 대한 최악 비율을 최소화하는 고정된 하나의 보폭이라는 뜻입니다. 특정 시작점, 매번 바꾸는 선탐색, 다른 알고리즘 전체에서 가장 빠르다는 주장이 아닙니다.

For an SPD quadratic, the worst one-step Euclidean error factor is maxᵢ|1−ηλᵢ|. Balancing the endpoint factors yields the best fixed step for that worst-direction criterion.

ηfixed⋆=2L+μ,ρ⋆=L−μL+μ,∥ek∥≤(ρ⋆)k∥e0∥\eta_{\rm fixed}^\star=\frac2{L+\mu},\qquad \rho^\star=\frac{L-\mu}{L+\mu},\qquad \|e_k\|\le(\rho^\star)^k\|e_0\|

The objective error is a weighted squared sum and contracts by at most ρ² per step. Equal eigenvalues give one-step convergence: retain the initial error at k=0 and use zero for k≥1, without evaluating 0⁰.

Optimal here means one constant step minimizing a worst-direction factor. It does not mean fastest for every special start, line search or alternative algorithm.

기초Foundations

21. 조건수 κ는 곡률의 큰 방향과 작은 방향의 비21. The condition number compares largest and smallest curvature

양의 정부호 헤시안에서 κ=L/μ≥1을 유클리드 스펙트럼 조건수라고 합니다. 앞의 고정 보폭 축소율은 (κ−1)/(κ+1)입니다. κ=1이면 0, κ=10이면 9/11, κ=100이면 99/101로 1에 가까워집니다.

κ=Lμ,ρ⋆=κ−1κ+1\kappa=\frac L\mu,\qquad\rho^\star=\frac{\kappa-1}{\kappa+1}

조건수가 크면 모든 방향에 안전한 보폭으로 느린 방향도 충분히 움직이기 어렵습니다. 이것은 선택한 좌표와 노름의 기하에 대한 수치 특성이지, 어떤 실제 변수가 경제적으로 더 중요하다는 뜻은 아닙니다.

최소제곱 L=‖Xβ−y‖²/(2n)의 full-column-rank 설계에서는 H=XᵀX/n이므로 κ₂(H)=κ₂(X)²입니다. 정규방정식의 수치 민감도와 경사하강법의 곡률 비가 같은 Gram 구조를 통해 연결됩니다. 랭크 결손이면 μ=0이라 이 유한 강볼록 조건수를 쓰지 않습니다.

For an SPD Hessian, κ=L/μ≥1 is the Euclidean spectral condition number. The best fixed quadratic factor is (κ−1)/(κ+1), approaching one as conditioning worsens.

κ=Lμ,ρ⋆=κ−1κ+1\kappa=\frac L\mu,\qquad\rho^\star=\frac{\kappa-1}{\kappa+1}

This is geometry in chosen coordinates and norm, not a measure of economic importance.

For full-column-rank least squares, H=XᵀX/n and κ₂(H)=κ₂(X)². This connects algorithm speed and Gram-matrix conditioning. Rank deficiency gives μ=0, outside this finite strongly convex condition number.

기초Foundations

22. 척도 실습: 같은 함수를 다른 좌표로 풀기22. Conditioning lab: solve the same objective in different coordinates

이 실습은 원좌표 z에서 f(z)=½(z₁²+z₂²)인 같은 문제를 여러 좌표로 풀어 봅니다. z=(q₁,sq₂),s>0이면 q=(z₁,z₂/s)이고 F(q)=f(z(q))=½(q₁²+s²q₂²)입니다. 원래 시작점 z₀를 고정하고 q₀를 변환합니다.

Hz=I,Hq=diag⁡(1,s2),κq=max⁡(1,s2)min⁡(1,s2),ηq⋆=21+s2H_z=I,\quad H_q=\operatorname{diag}(1,s^2),\qquad\kappa_q=\frac{\max(1,s^2)}{\min(1,s^2)},\quad\eta^\star_q=\frac2{1+s^2}

s=1이면 두 좌표가 같고 η=1로 한 번에 해결됩니다. s=0.1 또는 10이면 q조건수는 100입니다. 같은 η로 비교할 때와 각 표현의 최적 고정 보폭으로 비교할 때를 구별하세요. s=10의 q에서 η=1은 큰 곡률 방향에 불안정하지만 원좌표에서는 같은 숫자가 한 번에 해결합니다.

척도변환은 조건수를 개선할 수도 악화할 수도 있습니다. 별도 예로 원래 ½(x₁²+κx₂²)를 x₂=θ₂/√κ로 바꾸면 등방화됩니다. 실습의 원단위 복원값과 좌표별 반복값을 구별하세요. 최적점 자체나 관측 정보가 바뀐 것이 아니라 그 점에 가는 계산 경로가 바뀌었습니다.

This lab keeps the physical objective f(z)=½(z₁²+z₂²) fixed and uses z=(q₁,sq₂),s>0. Thus q=(z₁,z₂/s) and F(q)=½(q₁²+s²q₂²). Transform the same fixed physical starting point.

Hz=I,Hq=diag⁡(1,s2),κq=max⁡(1,s2)min⁡(1,s2),ηq⋆=21+s2H_z=I,\quad H_q=\operatorname{diag}(1,s^2),\qquad\kappa_q=\frac{\max(1,s^2)}{\min(1,s^2)},\quad\eta^\star_q=\frac2{1+s^2}

At s=1 both coordinates agree and step one solves immediately. At s=0.1 or ten, q-conditioning is 100. Distinguish comparisons using a common step from those using each representation's best fixed step. At s=10, step one is unstable in q but solves the physical-coordinate problem immediately.

Scaling can improve or worsen conditioning. As a separate example, x₂=θ₂/√κ makes ½(x₁²+κx₂²) isotropic. Distinguish mapped physical values from coordinate values: computational paths change, not the underlying optimum or observations.

학부 연결 · 선택Undergraduate bridge · optional

23. 연쇄법칙이 보여 주는 좌표별 기울기23. The chain rule gives coordinate-dependent gradients

x=Sθ이고 F(θ)=f(Sθ)일 때 야코비안 전치 연쇄법칙에서 ∇θF=Sᵀ∇ₓf입니다. 그 기울기로 θ를 업데이트한 뒤 원좌표로 돌아오면 일반 x경사하강법과 다른 행렬이 붙습니다.

θk+1=θk−ηST∇xf(xk)⟹xk+1=xk−ηSST∇xf(xk)\theta_{k+1}=\theta_k-\eta S^{\mathsf T}\nabla_x f(x_k)\quad\Longrightarrow\quad x_{k+1}=x_k-\eta SS^{\mathsf T}\nabla_x f(x_k)

직교 S라면 SSᵀ=I라 같은 원좌표 경로가 됩니다. 일반 척도변환은 그렇지 않아서 경사하강법은 단위 변환에 무조건 불변이 아닙니다. 좌표를 바꿨다면 보폭과 종료 기준을 다시 해석해야 합니다.

SSᵀ 같은 양의 정부호 행렬을 사용해 방향의 척도를 조절하는 생각은 전처리와 연결됩니다. 여기서는 이차함수에서 정확히 검산할 수 있는 범위만 사용하며 임의의 전처리가 항상 좋아진다고 주장하지 않습니다.

For F(θ)=f(Sθ), the transpose chain rule gives ∇θF=Sᵀ∇ₓf. Mapping a transformed gradient step back changes its geometry.

θk+1=θk−ηST∇xf(xk)⟹xk+1=xk−ηSST∇xf(xk)\theta_{k+1}=\theta_k-\eta S^{\mathsf T}\nabla_x f(x_k)\quad\Longrightarrow\quad x_{k+1}=x_k-\eta SS^{\mathsf T}\nabla_x f(x_k)

Orthogonal changes preserve the original path; general scaling does not. Step sizes and stopping tolerances need reinterpretation.

This connects to preconditioning, but arbitrary transformations need not improve every problem.

기초Foundations

24. 목적함수 정규화도 보폭과 함께 바꿔야24. Objective normalization changes the matching step size

F=c f,c>0이면 같은 최소점을 가지지만 기울기는 c배입니다. f에서 보폭 η로 이동하는 경로를 F에서 똑같이 만들려면 보폭 η/c를 써야 합니다.

x−ηc∇(cf)(x)=x−η∇f(x)x-\frac\eta c\nabla(cf)(x)=x-\eta\nabla f(x)

따라서 SSE와 SSE/(2n)에 같은 숫자의 학습률을 넣으면 일반적으로 다른 반복입니다. 정규화 후 L과 μ는 c배이고 조건수 L/μ는 변하지 않지만 안전 보폭은 1/c배입니다.

좌표 정규화와 목적함수 정규화를 구별하세요. 앞 절의 좌표변환은 헤시안을 SᵀHS로 바꿔 조건수도 바꿀 수 있습니다. 목적함수 양수배만으로는 조건수가 개선되지 않습니다.

For F=c f with c>0, gradients scale by c. Reproducing the same path requires dividing the step size by c.

x−ηc∇(cf)(x)=x−η∇f(x)x-\frac\eta c\nabla(cf)(x)=x-\eta\nabla f(x)

SSE and normalized SSE generally need different numerical learning rates. Both L and μ scale, preserving their ratio but changing safe steps.

Coordinate scaling can change the condition number through SᵀHS; positive objective scaling alone cannot.

기초Foundations

25. Armijo 검사는 예측 감소의 일부를 실제로 얻는가?25. Armijo checks for sufficient actual decrease

L을 모를 때는 일단 보폭을 정하고 실제 함수값을 검사할 수 있습니다. g≠0에서 원하는 감소 비율 c를 0<c<1로 정하고 다음 식을 확인합니다. 이 절의 c는 목적함수 배율과 별개의 이름입니다.

f(x−ηg)≤f(x)−cη∥g∥2,0<c<1f(x-\eta g)\le f(x)-c\eta\|g\|^2,\qquad0<c<1

선형 예측은 η‖g‖²만큼 감소한다고 말하지만 나머지 오차가 있으므로 그 일부 c만 요구합니다. L-매끄러움에서 η≤2(1−c)/L이면 충분하다는 사실을 10절 부등식에 대입해 확인할 수 있습니다.

이 장의 실습은 c=1/2를 사용합니다. 이 선택은 위 감소 정리로 정당화됩니다. 다른 교재는 다른 알고리즘 분석이나 기본값 때문에 c<1/2를 권할 수 있으므로 구체 식과 가정을 비교합니다. 정상점 g=0에서는 하강방향이 없어 별도로 종료·분류합니다.

When L is unknown, test actual objective values against a fraction c of the linearized decrease, with 0<c<1.

f(x−ηg)≤f(x)−cη∥g∥2,0<c<1f(x-\eta g)\le f(x)-c\eta\|g\|^2,\qquad0<c<1

L-smoothness guarantees acceptance when η≤2(1−c)/L. The lab uses c=1/2, justified by that bound; other references may choose a narrower default range for additional analyses.

At zero gradient, there is no nonzero descent direction and the method terminates or classifies the point separately.

기초Foundations

26. 되돌아가기 실습: 실패하면 보폭을 줄이고 재검사26. Backtracking lab: shrink rejected steps and test again

초기 보폭 η₀>0에서 시작해 Armijo 식이 실패하면 η를 β배합니다. 0<β<1이면 보폭은 점점 작아집니다. L-매끄러운 전체 공간 문제의 비영 기울기에서 충분히 작은 보폭은 통과하므로 정확한 계산에서는 유한 번 안에 받아들입니다.

η=η0βj,j=0,1,2,…;c=12, β=12 in this lab\eta=\eta_0\beta^j,\quad j=0,1,2,\ldots;\qquad c=\tfrac12,\ \beta=\tfrac12\text{ in this lab}

같은 양의 정부호 이차함수에서 각 시험 보폭의 실제 함수값과 요구 상한을 비교하세요. 통과한 보폭은 그 방향에서 충분히 줄이는 값이지 정확한 선최소점일 필요는 없습니다.

실제 구현에서는 함수 정의역과 비유한 수, 최대 재검사 횟수, 너무 작은 보폭을 처리합니다. 한 번의 선탐색이 종료한다는 정리와 전체 반복의 전역 최소 수렴은 다릅니다. 후자의 보장에는 볼록성·강볼록성·보폭 하한 같은 가정을 따로 확인합니다.

Start with η₀>0 and multiply rejected trials by β∈(0,1). Global L-smoothness ensures a sufficiently small trial passes at a nonzero gradient, so exact-arithmetic backtracking terminates finitely.

η=η0βj,j=0,1,2,…;c=12, β=12 in this lab\eta=\eta_0\beta^j,\quad j=0,1,2,\ldots;\qquad c=\tfrac12,\ \beta=\tfrac12\text{ in this lab}

Compare actual and required values for each quadratic trial. An accepted step need not exactly minimize along the ray.

Implementations must handle domains, nonfinite values and finite trial limits. Termination of one line search is separate from convergence of the whole algorithm to a global optimum.

학부 연결 · 선택Undergraduate bridge · optional

27. 정확 선탐색과 최적 고정 보폭은 다른 문제27. Exact line search differs from a best fixed step

양의 정부호 이차함수에서 현재 g≠0이라 합시다. η에 대한 함수 f(x−ηg)는 한 변수 이차함수이고 선 위 최소를 정확히 구할 수 있습니다.

f(x−ηg)=f(x)−η∥g∥2+12η2gTHg,ηline=∥g∥2gTHgf(x-\eta g)=f(x)-\eta\|g\|^2+\tfrac12\eta^2g^{\mathsf T}Hg,\qquad \eta_{\rm line}=\frac{\|g\|^2}{g^{\mathsf T}Hg}

이 보폭은 현재 기울기 방향에 따라 달라지므로 반복마다 바뀔 수 있습니다. 20절의 2/(L+μ)는 모든 고유방향의 최악 배율을 균형 맞추는 고정값입니다. 둘은 최적화하는 기준이 다릅니다.

g=0이면 위 분수는 0/0이라 계산하지 않습니다. 이차함수의 정확 선탐색이 일반 함수의 닫힌 공식으로 그대로 확장되지도 않습니다. 되돌아가기 검사는 정확 최소 대신 충분한 감소를 얻어 계산 비용을 줄입니다.

For an SPD quadratic and nonzero current gradient, minimizing along the negative-gradient ray is a one-variable quadratic calculation.

f(x−ηg)=f(x)−η∥g∥2+12η2gTHg,ηline=∥g∥2gTHgf(x-\eta g)=f(x)-\eta\|g\|^2+\tfrac12\eta^2g^{\mathsf T}Hg,\qquad \eta_{\rm line}=\frac{\|g\|^2}{g^{\mathsf T}Hg}

This step depends on the current direction and can change each iteration. It optimizes a different criterion from the best fixed worst-direction step 2/(L+μ).

At zero gradient the fraction is undefined, not a step to compute. General objectives need not admit this closed formula.

기초Foundations

28. 한 점의 헤시안으로 전역 보폭을 정하지 않기28. A Hessian at one point is not a global step bound

x⁴의 원점에서는 헤시안이 0이지만 멀리서는 곡률이 커집니다. 현재점의 작은 곡률만 보고 아주 큰 보폭을 안전하다고 선언할 수 없습니다. L-매끄러움의 L은 관련된 선분과 영역 전체에서 유효한 상한이어야 합니다.

제한된 구간에서는 |f″|의 상한을 구할 수 있습니다. 그러나 업데이트가 그 구간을 벗어나면 그 상한을 다음 단계에 그대로 사용할 수 없습니다. 유계 수준집합과 선탐색 같은 도구로 경로가 머무는 영역을 증명하는 일도 알고리즘 분석의 일부입니다.

이 장의 비볼록 사차함수 실습은 고정 보폭에서 실패할 수 있는 실험으로도 사용합니다. 전체 실수에서 유한 L이 없으므로 앞의 전역 L-매끄러움 정리를 무조건 적용하지 않습니다. 실습에 그린 창은 자동 제약이나 안전 영역이 아닙니다.

The zero Hessian of x⁴ at the origin does not provide a global curvature bound. A smoothness constant must hold on the relevant segments and region.

Bounded-interval curvature estimates cease to apply if updates leave that interval. Proving that iterates remain in a controlled region can itself require analysis.

The nonconvex quartic lab can exhibit fixed-step failure. Its curvature is unbounded on the real line, so the global L-smooth theorem cannot be applied automatically. A plotting window is not a safety constraint.

기초Foundations

29. 비볼록 실습: 같은 함수·다른 시작·다른 결론29. Nonconvex lab: the same function can have different outcomes

19장의 f=x⁴/4−x³/3−x²를 다시 씁니다. 정지점 −1은 국소 최소, 0은 국소 최대, 2는 전역 최소였습니다. 경사하강법은 그 점에서 시작하면 모두 그대로 멈춥니다.

xk+1=xk−ηxk(xk−2)(xk+1)x_{k+1}=x_k-\eta x_k(x_k-2)(x_k+1)

시작점을 약간 바꿔 어느 골짜기로 가는지 관찰하세요. η도 바꾸면 안정·왕복·폭주가 달라질 수 있습니다. 유한한 표시 반복만으로 모든 시작점의 도착 영역을 완전히 분류했다고 주장하지 않습니다.

0에서 기울기 0이라는 종료는 정확한 계산이어도 최대에 멈춘 예입니다. 작은 임의 변화나 여러 초기값은 실무에서 진단에 도움이 되지만 일반 전역 최적의 증명은 아닙니다. 최종 함수값을 앞 장의 정확한 전역값 −8/3과 비교하는 이 예는 특별히 진실값을 아는 검산 실험입니다.

Return to f=x⁴/4−x³/3−x². Its stationary points −1,0,2 are a local minimum, local maximum and global minimum. Starting exactly at any one leaves it fixed.

xk+1=xk−ηxk(xk−2)(xk+1)x_{k+1}=x_k-\eta x_k(x_k-2)(x_k+1)

Vary the start and step to observe different valleys and possible instability. A finite experiment does not classify every attraction region.

Stopping at zero gradient can mean stopping at a maximum. Multiple starts and perturbations aid diagnosis, but do not generally prove global optimality. This special example has a known global value −8/3 for comparison.

기초Foundations

30. 안장에 정확히 놓이면 내려가는 방향이 있어도 정지30. An exact saddle start can remain fixed despite descent directions

f(x,y)=x²−y²의 원점은 안장점이고 기울기 0입니다. 경사하강법 업데이트는 x다음=(1−2η)x, y다음=(1+2η)y입니다. 원점에서 시작하면 모든 반복이 원점입니다.

y0=0: yk=0;y0≠0, η>0: ∣yk∣=(1+2η)k∣y0∣y_0=0:\ y_k=0;\qquad y_0\ne0,\ \eta>0:\ |y_k|=(1+2\eta)^k|y_0|

작은 y성분이 있으면 내려가는 방향으로 멀어지지만 이 함수는 아래로 유계가 아니므로 전역 최소가 없습니다. 안장을 벗어났다는 사실과 최적값을 찾았다는 사실은 다릅니다.

실제 비볼록 머신러닝에는 더 복잡한 안장·평탄 영역이 있습니다. 이 한 예로 모든 안장 탈출의 확률·속도를 일반화하지 않습니다. 여기서 필요한 교훈은 기울기 종료와 이계 분류를 구별하는 것입니다.

The origin of x²−y² is a saddle with zero gradient. Updates multiply x by 1−2η and y by 1+2η. An exact origin start never moves.

y0=0: yk=0;y0≠0, η>0: ∣yk∣=(1+2η)k∣y0∣y_0=0:\ y_k=0;\qquad y_0\ne0,\ \eta>0:\ |y_k|=(1+2\eta)^k|y_0|

A nonzero y perturbation escapes downhill, but the function is unbounded below and has no global minimum. Escaping a saddle is not the same as finding an optimum.

This example motivates separate stopping and curvature checks without claiming general escape probabilities or rates.

기초Foundations

31. 작은 이동·작은 기울기·작은 손실 변화는 다르다31. Small steps, small gradients and small loss changes differ

업데이트 이동량은 η‖g‖입니다. η를 극도로 작게 정하면 기울기가 커도 이동량은 작습니다. 따라서 ‘거의 안 움직인다’만으로 최적점 가까이에 있다고 결론 내리지 않습니다.

∥xk+1−xk∥=η∥∇f(xk)∥\|x_{k+1}-x_k\|=\eta\|\nabla f(x_k)\|

손실 변화가 작을 때도 작은 η, 평평한 방향, 반올림, 정지점 등 원인이 여럿입니다. 현재 손실값의 상대 변화는 손실이 0 근처일 때 불안정하므로 절대·상대 기준을 함께 쓰고 단위를 명시합니다.

최대 반복 수는 계산 예산 종료이지 최적성의 증명은 아닙니다. 종료 이유를 ‘기울기 기준’, ‘이동량 기준’, ‘예산 종료’, ‘비유한 수로 중단’처럼 실제 조건으로 구별하고, 가능한 이론 상계나 추가 검산을 함께 제시하세요.

The movement size is η‖g‖. Tiny η can create tiny movement despite a large gradient, so stalling alone does not certify proximity to an optimum.

∥xk+1−xk∥=η∥∇f(xk)∥\|x_{k+1}-x_k\|=\eta\|\nabla f(x_k)\|

Small objective changes can result from small steps, flat directions, rounding or stationarity. Relative changes are unstable near zero; use scaled absolute and relative criteria.

A maximum iteration budget is a resource limit, not an optimality proof. Report the actual termination reason and any accompanying error certificate.

학부 연결 · 선택Undergraduate bridge · optional

32. 작은 기울기를 오차 보증으로 바꾸는 데 필요한 상수32. Turning a gradient tolerance into an error certificate needs constants

실수 공간 전체의 μ-강볼록·L-매끄러운 함수에서는 다음과 같이 기울기와 최적값 오차를 양쪽에서 연결할 수 있습니다. μ>0,L>0이며 최소점은 유일합니다.

∥∇f(x)∥22L≤f(x)−f⋆≤∥∇f(x)∥22μ,∥x−x⋆∥≤∥∇f(x)∥μ\frac{\|\nabla f(x)\|^2}{2L}\le f(x)-f^\star\le\frac{\|\nabla f(x)\|^2}{2\mu},\qquad \|x-x^\star\|\le\frac{\|\nabla f(x)\|}{\mu}

왼쪽은 η=1/L 감소와 f*≤f다음에서, 오른쪽 함수값은 16절에서 옵니다. 거리 상계는 강단조성 (g(x)−g(x*))ᵀ(x−x*)≥μ‖x−x*‖²와 Cauchy–Schwarz를 결합합니다.

μ가 매우 작으면 기울기 10⁻⁶도 큰 거리 상계를 줄 수 있습니다. 단지 ‘작은 숫자’가 아니라 어떤 좌표에서 얼마의 μ를 사용하는지 확인해야 합니다. 비볼록 함수나 μ를 모르는 경우에 이 인증을 그대로 사용하지 않습니다.

For a globally μ-strongly convex, L-smooth objective, gradient size gives both objective and distance certificates.

∥∇f(x)∥22L≤f(x)−f⋆≤∥∇f(x)∥22μ,∥x−x⋆∥≤∥∇f(x)∥μ\frac{\|\nabla f(x)\|^2}{2L}\le f(x)-f^\star\le\frac{\|\nabla f(x)\|^2}{2\mu},\qquad \|x-x^\star\|\le\frac{\|\nabla f(x)\|}{\mu}

The lower bound follows from a 1/L descent step; the upper objective bound follows from strong convexity. Strong gradient monotonicity and Cauchy–Schwarz give the distance bound.

A tiny μ can make a seemingly tiny gradient compatible with a large distance bound. State coordinates and certified constants; do not reuse this certificate in nonconvex problems without its assumptions.

기초Foundations

33. 정확한 수열과 컴퓨터에 저장된 반복은 다를 수 있다33. Exact recurrences and stored numerical iterates can differ

이론은 실수의 정확한 연산을 가정하지만 컴퓨터는 유한 정밀도로 저장합니다. 충분히 작은 ηg는 x의 저장 간격보다 작아 x−ηg가 x와 똑같이 저장될 수 있습니다. 이는 정확한 기울기 0과 다른 종료입니다.

조건수가 큰 손실에서는 함수값이 큰 기준 상수와 작은 개선량의 합이라 손실의 뺄셈이 상쇄될 수 있습니다. 이차함수에서는 알고 있는 최적점과 H로 gap=½eᵀHe를 별도로 계산하면 f−f*의 직접 뺄셈보다 안정적인 검산이 됩니다.

로그 오차 그래프에서 오차 0은 로그가 정의되지 않습니다. 작은 양수로 임의 바꿨다면 그것이 표시용 하한임을 밝히고 실제 0과 분리합니다. NaN·∞·overflow 중단을 ‘발산 증명’이나 ‘수렴 완료’와 같은 말로 표기하지 않습니다. 이론적 불안정성과 구현의 비유한 결과를 함께 기록하세요.

Theory uses exact arithmetic; computers store finite precision. A tiny update can round back to the unchanged stored x despite a nonzero true gradient.

Large baseline losses can hide small changes by cancellation. For a known quadratic, evaluating gap as ½eᵀHe can be more stable than subtracting nearly equal f and f*.

Logarithmic error plots cannot directly display zero. Label any display floor and distinguish it from exact zero. Nonfinite numerical termination is not by itself a mathematical proof of convergence or divergence.

기초Foundations

34. 수렴 그래프는 무엇을 세로축에 놓았는지부터34. Read the vertical-axis quantity before interpreting a convergence plot

기하급수적 양수 오차 Cρᵏ는 로그 세로축에서 직선이고, C/k는 로그-로그 축에서 기울기 −1의 직선입니다. 같은 모양처럼 보이는 그래프도 축·오차 정의에 따라 의미가 다릅니다.

log⁡(Cρk)=log⁡C+klog⁡ρ,log⁡(C/k)=log⁡C−log⁡k\log(C\rho^k)=\log C+k\log\rho,\qquad \log(C/k)=\log C-\log k

진단 기록에는 반복 수, 목적함수, 가능한 gap, 기울기 노름, 이동량, 선택 보폭, 선탐색 재검사 횟수를 남깁니다. 비볼록 사차식에서 최적값을 아는 것은 검산용 특별 조건이며 실무에서 항상 가능한 것은 아닙니다.

유한 구간에서 직선처럼 보였다고 점근 수렴율을 증명하지 않습니다. 이론 상계, 정확히 계산한 특수 함수, 실제 반복의 관측을 각각 표시합니다. 그래프는 증명의 대체물이 아니라 그 가정과 계산을 점검하는 도구입니다.

A positive geometric error is linear on a semilog plot; C/k is linear with slope −1 on a log-log plot. Axis choices and the error quantity matter.

log⁡(Cρk)=log⁡C+klog⁡ρ,log⁡(C/k)=log⁡C−log⁡k\log(C\rho^k)=\log C+k\log\rho,\qquad \log(C/k)=\log C-\log k

Record objective, available gap, gradient norm, movement, accepted step and trial count. A known optimum is a special validation advantage, not universal practical information.

A straight-looking finite segment does not prove an asymptotic rate. Label theoretical bounds, exact special-case results and computed trajectories separately.

기초Foundations

35. 일반 경사하강법은 제약을 자동으로 지키지 않는다35. Ordinary gradient descent does not automatically preserve constraints

min ½(x+1)² subject to x≥0의 해는 0입니다. 여기서 일반 경사하강법을 그대로 쓰면 x₀=0의 기울기가 1이라 다음 점 −η는 허용되지 않습니다. 제약 최적점에서 원래 목적함수 기울기가 0이 아닐 수 있다는 20장의 교훈입니다.

x0=0,x1=−η<0(η>0)x_0=0,\qquad x_1=-\eta<0\qquad(\eta>0)

정사영을 넣거나 제약을 매개화하거나 다른 알고리즘을 사용하는 방법이 있지만, 그 업데이트와 수렴 정리는 달라집니다. 이번 장의 전역 기본 보장은 무제약 실수 공간을 대상으로 합니다.

또한 제약 문제의 Lagrangian을 모든 변수에서 같은 방향으로 경사하강하는 것은 일반 KKT 해법이 아닙니다. 승수의 자유·비음수 영역과 쌍대 최대화 구조를 보존해야 합니다. 이후 볼록 최적화·근접 연산 장에서 이러한 차이를 확장합니다.

The optimum of ½(x+1)² over x≥0 is zero. Ordinary gradient descent started there moves to −η, violating feasibility.

x0=0,x1=−η<0(η>0)x_0=0,\qquad x_1=-\eta<0\qquad(\eta>0)

Projection, parameterization and constrained algorithms have different updates and guarantees. Our basic whole-space results are unconstrained.

Likewise, jointly descending every Lagrangian variable is not a general KKT solver. Preserve multiplier domains and the dual maximization structure.

기초Foundations

36. 실제 자료로 정의한 손실을 무차원 좌표에서 반복36. Iterate actual-data losses in specified dimensionless coordinates

국가 사례는 11개 실제 GDP/명 자료의 직선 손실 L(a,b)를 F=L/10⁶으로 정규화하고 θ=(a/1000,b/100)로 표시합니다. 연도 중심은 2019년이고 단위 변환을 모두 보존합니다. Hθ=diag(1,0.1), 시작 θ=(33,7), 최소 θ*≈(33.2900897787,7.54475928535)입니다.

ηfixed⋆=20/11,ρ⋆=9/11;0<η<2 gives convergence from every start\eta_{\rm fixed}^\star=20/11,\quad \rho^\star=9/11;\qquad0<\eta<2\text{ gives convergence from every start}

η=1,20/11,2,2.1을 비교할 때 2는 큰 고유방향의 왕복 경계입니다. 실제 자료의 연간 GDP가 왕복한다는 뜻이 아니라 고정 자료에 맞추는 계수의 계산 수열입니다.

가구 사례는 실제 1,440분의 주방·세탁 Wh를 두 상수로 요약한 손실을 1 Wh²로 나누고 각 계수를 1 Wh로 나누어 무차원화합니다. H=I이고 θ₀=(0,0)에서 η=1은 실제 평균에 한 번에 도착, 1/2는 수렴, 2는 왕복, 2.2는 비영 오차에서 발산합니다. 원자료 관측은 반복마다 바뀌지 않습니다.

The country case normalizes the actual 11-year GDP-line loss by 10⁶ and uses θ=(a/1000,b/100), retaining physical-unit conversions. The Hessian is diag(1,0.1), start (33,7), and optimum about (33.2900897787,7.54475928535).

ηfixed⋆=20/11,ρ⋆=9/11;0<η<2 gives convergence from every start\eta_{\rm fixed}^\star=20/11,\quad \rho^\star=9/11;\qquad0<\eta<2\text{ gives convergence from every start}

Compare steps 1,20/11,2 and 2.1. Oscillation concerns fitted coefficients on fixed data, not observed national GDP dynamics.

The household loss summarizes 1,440 observed kitchen/laundry Wh records with two constants, normalizing coefficients by 1 Wh and loss by 1 Wh². Its Hessian is I: step one reaches actual means immediately, 1/2 converges, two cycles and 2.2 diverges from nonzero error. Observations remain unchanged.

기초Foundations

37. 실제 기업 사례: 두 무차원 좌표도 조건수가 다를 수 있다37. Actual company example: dimensionless coordinates can still differ in conditioning

18장의 실제 매출 손실 L(α,δ)=Σ(αxᵢ+δ서비스ᵢ−zᵢ)²/10을 S=100000 백만 USD로 정규화해 F=L/S²로 씁니다. 두 좌표 r=(α,δ/(1 백만 USD)), q=(α,δ/S)는 모두 무차원이지만 서로 다른 척도입니다.

Hr=(1.014858547261.704 10−61.704 10−62 10−11),Hq=(1.014858547260.17040.17040.2)H_r=\begin{pmatrix}1.01485854726&1.704\,10^{-6}\\1.704\,10^{-6}&2\,10^{-11}\end{pmatrix},\qquad H_q=\begin{pmatrix}1.01485854726&0.1704\\0.1704&0.2\end{pmatrix}

r의 조건수는 약 5.9214×10¹⁰, q는 약 6.3272입니다. 두 경우 모두 시작은 실제 같은 모형 α=1,δ=0이고 η=1을 씁니다. r은 작은 곡률 방향이 거의 움직이지 않지만 q는 훨씬 빠르게 최적 δ≈11007.8988285 백만 USD에 접근합니다.

20번 반복에서 r의 기울기 노름은 약 1.89×10⁻⁷로 작아도 F의 gap이 약 0.00103839 남습니다. 매우 작은 μ가 작은 기울기 인증을 약하게 만든 예입니다. 실제 기업에서 어떤 변수가 더 중요하다는 결론이 아니라 선택한 계수 좌표의 계산 기하입니다. q와 r의 결과는 원단위 δ로 복원한 뒤 비교합니다.

Normalize the actual sales loss L(α,δ)=Σ(αxᵢ+δserviceᵢ−zᵢ)²/10 by S², where S=100000 million USD. Coordinates r=(α,δ/(1 million USD)) and q=(α,δ/S) are both dimensionless but differently scaled.

Hr=(1.014858547261.704 10−61.704 10−62 10−11),Hq=(1.014858547260.17040.17040.2)H_r=\begin{pmatrix}1.01485854726&1.704\,10^{-6}\\1.704\,10^{-6}&2\,10^{-11}\end{pmatrix},\qquad H_q=\begin{pmatrix}1.01485854726&0.1704\\0.1704&0.2\end{pmatrix}

The condition numbers are about 5.9214×10¹⁰ and 6.3272. Both start at the same physical model α=1,δ=0 and use step one. The q coordinates approach optimal δ≈11007.8988285 million USD much faster.

After 20 r-steps, gradient norm is only about 1.89×10⁻⁷ while normalized objective gap remains about 0.00103839. Tiny curvature weakens a small-gradient certificate. This concerns coordinate geometry, not economic importance. Compare results after restoring the original δ units.

기초Foundations

38. 국가·가구·기업의 반복 실험38. Country, household and company iteration cases

국가 사례 · 같은 실제 적합 문제에서 학습률만 바꿔 보기

한국의 실제 연간 GDP/명 11개에 맞추는 직선 a+b t, t=연도−2019를 유지합니다. 다만 a와 b는 단위가 다르므로 서로 다른 단위의 gradient를 같은 숫자 보폭으로 곧바로 빼지 않습니다. 아래처럼 각 계수를 기준 단위로 나눈 무차원 좌표 θ와 무차원 손실 F를 먼저 정의합니다. 실제 관측과 목적의 최적 예측값은 바꾸지 않습니다.

θ1=a1000 GDPpc units,θ2=b100 GDPpc units/year,F(θ)=L(a,b)106 GDPpc units2\theta_1=\frac{a}{1000\ {\rm GDPpc\ units}},\quad\theta_2=\frac{b}{100\ {\rm GDPpc\ units/year}},\qquad F(\theta)=\frac{L(a,b)}{10^6\ {\rm GDPpc\ units}^2}

여기서 GDPpc unit는 2015 USD/명입니다. 원단위로 돌아가려면 a=1,000θ₁, b=100θ₂를 씁니다. L은 제곱오차 합/(2×11)입니다. 분석적으로 구한 최소점은 θ*≈(33.290089779, 7.544759285), Hessian은 H=diag(1,0.1)입니다.

θk+1=θk−η∇F(θk),θ0=(33,7)T,ek+1=(I−ηH)ek\theta_{k+1}=\theta_k-\eta\nabla F(\theta_k),\quad\theta_0=(33,7)^{\mathsf T},\qquad e_{k+1}=(I-\eta H)e_k

η는 이 좌표·이 손실에서 정의한 무차원 학습률입니다. 출발점은 실제 단위로 a=33,000,b=700입니다. 각 반복은 실제 자료를 바꾸는 정책이나 새 GDP 관측이 아니라 적합 계수의 계산입니다. 그림은 정확한 F*를 빼고 초기 초과손실로 나눈 비율을 표시합니다.

1. 스펙트럼 조건을 실제 수치로 확인하기

λmin⁡=0.1,λmax⁡=1,0<η<2,ρ(η)=max⁡(∣1−η∣,∣1−0.1η∣)\lambda_{\min}=0.1,\quad\lambda_{\max}=1,\quad0<\eta<2,\qquad\rho(\eta)=\max(|1-\eta|,|1-0.1\eta|)
동일한 입력·출발점에서의 초과손실 F−F* (무차원)
반복 kη=1η=20/11η=2 (경계)η=2.1
00.0569141740.0569141740.0569141740.056914174
10.0120188880.0380995710.0515724460.060172488
20.0097353000.0255046710.0481537400.067382995
50.0051737370.0076510080.0436692720.110539327
100.0018039710.0010285300.0422471120.283199577
200.0002193210.0000185870.0420780121.904331434
먼저 생각한 뒤 풀이 보기: η=2에서도 손실이 조금 줄어드는데 수렴한다고 할까요?

이 출발점에서는 첫 오차 성분이 매번 −1배가 되어 사라지지 않습니다. 둘째 성분은 0.8배라 일부 손실만 줄어듭니다. 따라서 최적점으로 수렴하지 않습니다. η=2.1은 첫 오차가 −1.1배여서 결국 커집니다. “처음 몇 번 감소했다”는 관찰과 모든 반복의 수렴 조건을 구별합니다.

먼저 생각한 뒤 풀이 보기: η=20/11은 무엇에 대해 가장 좋은 숫자인가요?

이 고정 H에서 고정 학습률의 최악 방향 오차배율 ρ를 최소화합니다. 2/(λmin+λmax)=20/11이고 ρ=9/11입니다. 매 반복에서 별도로 가장 좋은 보폭을 구하는 선 탐색이나, 모든 함수에 통하는 최적 학습률이라는 뜻은 아닙니다.

먼저 생각한 뒤 풀이 보기: a,b 대신 숫자 단위를 바꾸었을 뿐인데 왜 반복 경로가 달라질까요?

Euclidean gradient의 급한 방향은 좌표의 길이를 어떻게 재는지에 달려 있습니다. 계수를 다시 매개화하면 gradient와 Hessian이 바뀌어 같은 숫자 η의 경로도 달라집니다. 표의 η와 조건수는 명시한 무차원 좌표에서만 비교합니다. 경제적 중요도나 국민소득의 인과 민감도가 아닙니다.

자료: World Bank · 실제 한국 연간 GDP/명 · 실제 입력 CSV

가구 사례 · 한 번에 평균에 도착하는 경우와 두 점을 도는 경우

실제 주방·세탁실 에너지 1,440쌍을 두 상수 a,b로 요약합니다. θ=(a/(1Wh),b/(1Wh)), F=J/(1Wh)²로 두 좌표와 손실을 무차원으로 둡니다. 원래 J는 두 열 제곱오차 합/(2×1,440)입니다. θ*는 실제 평균쌍이며 H=I입니다.

θ∗≈(1.411805556,2.907638889)T,∇F=θ−θ∗,θk+1−θ∗=(1−η)(θk−θ∗)\theta^*\approx(1.411805556,2.907638889)^{\mathsf T},\quad\nabla F=\theta-\theta^*,\qquad\theta_{k+1}-\theta^*=(1-\eta)(\theta_k-\theta^*)

출발점 θ₀=(0,0)을 모든 학습률에서 같게 둡니다. η=1이면 정확한 분수 계산에서 한 번에 평균에 도착합니다. η=0.5는 오차벡터가 매번 절반, 초과손실은 4분의 1이 됩니다. η=2는 원점과 2θ*를 번갈아 방문합니다. 그림의 점들은 계산 반복이지 시간별 실측 소비가 아닙니다.

실제 평균으로 향하는 2차원 경로, η=0.5
반복 k주방 a (Wh)세탁실 b (Wh)초과손실 F−F*
00.0000000000.0000000005.223779417
10.7059027781.4538194441.305944854
21.0588541672.1807291670.326486214
51.3676866322.8167751740.005101347
101.4104268392.9047993980.000004982
먼저 생각한 뒤 풀이 보기: η=1이면 모든 실제 자료의 경사하강법이 한 번에 끝나나요?

이 사례는 선택한 상수 적합의 H가 정확히 I라서 가능합니다. 일반 회귀의 Hessian이 I라는 보장은 없고 회사 사례에는 교차 성분도 있습니다. 한 번에 도착한 이유는 “실제 자료”라는 사실이 아니라 이 목적함수와 좌표의 구조입니다.

먼저 생각한 뒤 풀이 보기: η=2에서는 좌표가 크게 움직이는데 목적함수가 왜 같나요?

오차가 매번 부호만 반대로 바뀌어 길이가 보존됩니다. 초과손실은 ‖θ−θ*‖²/2라서 그대로이고, 비영 출발 오차에서는 최적점으로 수렴하지 않습니다. 단순히 반복을 많이 했다는 사실은 수렴의 증거가 아닙니다.

먼저 생각한 뒤 풀이 보기: η=2.2를 쓰면 실제 가구가 에너지를 더 소비한다는 뜻인가요?

아닙니다. 선택한 계산의 오차배율은 −1.2, 초과손실 배율은 1.44라 발산합니다. 변한 것은 요약 모형의 계수이고 원래의 1,440개 계량값은 고정되어 있습니다. 이 결과를 가전 행동이나 절약 효과로 해석하지 않습니다.

먼저 생각한 뒤 풀이 보기: 손실이 작아졌다면 내일의 전력도 잘 예측하나요?

여기서 검산한 것은 선택한 하루에 대한 상수 적합의 최적화입니다. 미래 예측이나 다른 가구로의 일반화는 별도 검증 자료와 모형이 필요합니다. 최적화 오차가 작다는 것과 예측 오차가 작다는 것은 다른 평가입니다.

자료: Hebrail·Berard · UCI 실제 두 계통 에너지 (CC BY 4.0) · 실제 입력 CSV

기업 사례 · 같은 적합 문제인데 좌표의 기준금액이 속도를 바꾼다

18장의 실제 Apple 두 연도 품목 매출을 다시 씁니다. FY2023 x에서 FY2024 z를 αx+δs로 비교하며 s는 서비스 행만 1인 벡터입니다. α는 무차원이고 δ는 백만 명목 USD입니다. 두 계수의 실제 분석적 최소는 α*≈0.999543441, δ*≈11,007.898829입니다. 이 참조값은 실제 매출이나 서비스 사업의 인과효과가 아닙니다.

F=L(α,δ)(100000 million USD)2,r=(α,δ/(1 million USD)),q=(α,δ/(100000 million USD))F=\frac{L(\alpha,\delta)}{(100000\ {\rm million\ USD})^2},\qquad r=(\alpha,\delta/(1\ {\rm million\ USD})),\quad q=(\alpha,\delta/(100000\ {\rm million\ USD}))

두 좌표 모두 무차원이지만 δ의 기준금액이 다릅니다. F와 실제 입력, 출발 예측 α=1,δ=0, η=1은 같게 둡니다. 각 좌표계의 Euclidean gradient를 쓰므로 반복 경로는 달라집니다. 비교를 위해 매번 δ를 원래 백만 USD로 역변환합니다.

Hr=[1.014858547260.0000017040.0000017040.00000000002],Hq=[1.014858547260.17040.17040.2]H_r=\begin{bmatrix}1.01485854726&0.000001704\\0.000001704&0.00000000002\end{bmatrix},\qquad H_q=\begin{bmatrix}1.01485854726&0.1704\\0.1704&0.2\end{bmatrix}
명시한 무차원 좌표의 곡률과 학습률 조건
항목r: δ의 기준 1백만 USDq: δ의 기준 100,000백만 USD
λmin1.713889585E-110.165801859387
λmax1.0148585472631.049056687873
κ₂=λmax/λmin59,213,764,765.0186.327170828
η의 열린 상한 2/λmax1.9707179935511.906474667309

η=1은 두 경우 모두 스펙트럼 수렴 범위 안입니다. 하지만 r에서는 작은 곡률 방향의 오차가 거의 줄지 않습니다. κ는 이 정규화 목적과 선택한 좌표·길이 기준의 값이며, 기업 자체에 고정된 경제적 위험도나 중요도가 아닙니다. 그림은 같은 F의 초과손실을 초기값으로 나눈 비율입니다.

20번 반복한 원단위 계수와 계산 진단
항목r 좌표q 좌표
α1.0180262725511.000109463486
δ (백만 USD)0.00000380410,725.865263607
F−F*0.0010383928820.000000685978
선택 좌표에서의 gradient norm0.0000001886630.000476941222
먼저 생각한 뒤 풀이 보기: r의 gradient norm가 10⁻⁶보다 작으면 최적점을 충분히 찾았나요?

r의 gradient norm는 약 0.000000188663로 작지만 δ는 분석적 최적값에서 약 11,007.9백만 USD 떨어져 있습니다. F 초과손실도 약 0.001038392882 남습니다. 작은 고유값 m에서는 강볼록함수의 상계 F−F*≤‖∇F‖²/(2m)도 작다고 장담할 수 없습니다. 정지 기준에는 좌표·손실 척도와 요구 정확도를 함께 적습니다.

먼저 생각한 뒤 풀이 보기: 같은 실제 예측을 표현하는데 q의 GD가 r의 GD와 왜 같지 않나요?

r=Dq, D=diag(1,100000)입니다. 같은 물리점에서 ∇qF=Dᵀ∇rF이고, q의 한 GD 단계를 r로 옮기면 r다음=r−ηDDᵀ∇rF입니다. 이는 r의 보통 GD와 다른 전처리된 단계입니다. 단순히 표의 소수점 위치만 바꾼 것이 아니라 급한 방향을 정하는 좌표 기하가 달라졌습니다.

먼저 생각한 뒤 풀이 보기: gradient가 정확히 0이면 어떤 함수에서도 전역 최소인가요?

일반 함수에서는 아닙니다. 가정함수 x²−y²의 원점은 gradient가 0이어도 안장점입니다. 여기의 세 손실은 Hessian이 양의 정부호인 이차함수라 정확한 분석적 최소와 gap 항등식으로 전역성을 검산할 수 있습니다. 그 근거를 임의의 신경망 손실에 그대로 옮기지 않습니다.

먼저 생각한 뒤 풀이 보기: 손실의 숫자를 100배하면 같은 η로 반복해도 되나요?

양의 상수배는 최소점 자체를 바꾸지 않지만 gradient와 Hessian도 100배가 됩니다. 같은 좌표 경로를 유지하려면 학습률을 100분의 1로 맞춰야 합니다. 손실 분모와 계수 단위가 없는 “η=1이 좋다”는 주장은 재현할 수 없습니다.

모든 반복에서 실제 FY2023·FY2024 공시는 고정됩니다. 두 회계연도의 53주·52주, 명목 단위와 가격·수량·환율 차이는 그대로이므로 이 계산은 실제 기업의 미래 성과나 가치평가를 검증하지 않습니다.

자료: SEC EDGAR · Apple 2024 Form 10-K 실제 품목 매출 · 실제 입력 CSV

모든 2차원 반복·원단위 역변환·손실·gradient CSV · 무차원 좌표·정확 Hessian·스펙트럼 조건 CSV · 실제 원자료·단위·계산·SHA-256

Country case · Change only the learning rate in an actual fitting problem

Retain the line a+b t with t=year−2019 fitted to eleven actual Korean GDP/person records. Because a and b have different units, do not subtract their raw gradients using an unexplained common numerical step. First define dimensionless coordinates θ and a dimensionless objective F using explicit reference units. Observations and optimal physical predictions remain the same.

θ1=a1000 GDPpc units,θ2=b100 GDPpc units/year,F(θ)=L(a,b)106 GDPpc units2\theta_1=\frac{a}{1000\ {\rm GDPpc\ units}},\quad\theta_2=\frac{b}{100\ {\rm GDPpc\ units/year}},\qquad F(\theta)=\frac{L(a,b)}{10^6\ {\rm GDPpc\ units}^2}

One GDPpc unit is constant 2015 USD/person. Recover physical coefficients with a=1,000θ₁ and b=100θ₂. L=SSE/(2×11). The analytic optimum is θ*≈(33.290089779,7.544759285), and H=diag(1,0.1).

θk+1=θk−η∇F(θk),θ0=(33,7)T,ek+1=(I−ηH)ek\theta_{k+1}=\theta_k-\eta\nabla F(\theta_k),\quad\theta_0=(33,7)^{\mathsf T},\qquad e_{k+1}=(I-\eta H)e_k

η is dimensionless for this coordinate system and objective. Start from physical a=33,000, b=700. Iterates are fitting calculations, not policy interventions or new GDP measurements. The graph divides excess loss over exact F* by its initial value.

1. Test the spectral condition with actual numbers

λmin⁡=0.1,λmax⁡=1,0<η<2,ρ(η)=max⁡(∣1−η∣,∣1−0.1η∣)\lambda_{\min}=0.1,\quad\lambda_{\max}=1,\quad0<\eta<2,\qquad\rho(\eta)=\max(|1-\eta|,|1-0.1\eta|)
Dimensionless excess loss F−F*, same inputs and start
Iteration kη=1η=20/11η=2 (boundary)η=2.1
00.0569141740.0569141740.0569141740.056914174
10.0120188880.0380995710.0515724460.060172488
20.0097353000.0255046710.0481537400.067382995
50.0051737370.0076510080.0436692720.110539327
100.0018039710.0010285300.0422471120.283199577
200.0002193210.0000185870.0420780121.904331434
Think first, then reveal: Does partial loss reduction at η=2 establish convergence?

Not for this start. Its first error coordinate is multiplied by −1 and never vanishes. Only the second shrinks by 0.8. The iterate therefore fails to converge to the optimum. With η=2.1 the first error multiplies by −1.1 and eventually grows. Initial improvement is not an all-iteration convergence guarantee.

Think first, then reveal: In what sense is η=20/11 best?

For this fixed H it minimizes the worst-direction error contraction among constant step sizes. The value is 2/(λmin+λmax), with ρ=9/11. This is neither exact line search at each iteration nor a universal best learning rate for arbitrary functions.

Think first, then reveal: Why can changing coefficient units change the path?

Euclidean steepest descent depends on the coordinate metric. Reparameterization changes the gradient and Hessian, so the same numerical η produces another path. Compare rates and condition numbers only in the stated dimensionless coordinates. They are not economic importance or causal GDP sensitivity.

Source: World Bank · actual Korean annual GDP/person · Actual-input CSV

Household case · Reaching the means once versus cycling between two points

Summarize 1,440 actual kitchen/laundry energy pairs by constants a, b. Set θ=(a/(1 Wh), b/(1 Wh)) and F=J/(1 Wh)². J is the sum of both-channel squared errors divided by 2×1,440. The optimum is the actual mean pair, and H=I.

θ∗≈(1.411805556,2.907638889)T,∇F=θ−θ∗,θk+1−θ∗=(1−η)(θk−θ∗)\theta^*\approx(1.411805556,2.907638889)^{\mathsf T},\quad\nabla F=\theta-\theta^*,\qquad\theta_{k+1}-\theta^*=(1-\eta)(\theta_k-\theta^*)

All runs start at θ₀=(0,0). Exact rational arithmetic reaches the means in one step for η=1. With η=0.5, vector error halves and excess loss quarters each step. With η=2, iterates alternate between zero and 2θ*. Plot points are computational iterates, not a time series of actual consumption.

A two-dimensional path toward actual means, η=0.5
Iteration kKitchen a (Wh)Laundry b (Wh)Excess loss F−F*
00.0000000000.0000000005.223779417
10.7059027781.4538194441.305944854
21.0588541672.1807291670.326486214
51.3676866322.8167751740.005101347
101.4104268392.9047993980.000004982
Think first, then reveal: Does η=1 solve every real-data GD problem in one step?

No. This chosen constant-fitting loss has H exactly equal to I. General regression need not; the company Hessian includes cross terms. One-step convergence follows from the objective and coordinates, not from the inputs merely being actual data.

Think first, then reveal: Why does η=2 preserve loss while coordinates keep moving?

The error vector flips sign while keeping its length. Excess loss is ‖θ−θ*‖²/2, so it stays unchanged. A nonzero starting error never converges to the optimum. Many iterations alone are not evidence of convergence.

Think first, then reveal: Does using η=2.2 mean the actual household consumes more energy?

No. Computational error multiplies by −1.2 and excess loss by 1.44, causing divergence. Only summary parameters change; all 1,440 actual observations remain fixed. This does not identify appliance behavior or conservation effects.

Think first, then reveal: Does lower loss establish accurate power forecasts tomorrow?

This verifies optimization of a constant summary on one selected day. Future or other-household prediction needs another model and validation data. Small optimization error and small prediction error are different assessments.

Source: Hebrail and Berard · UCI actual two-channel energy (CC BY 4.0) · Actual-input CSV

Company case · A reference amount changes speed in the same fitting problem

Reuse actual Apple FY 2023/FY 2024 category sales from Chapter 18. Fit the reference αx+δs to z, where only services has s=1. α is dimensionless; δ uses million nominal USD. The analytic optimum is α*≈0.999543441, δ*≈11,007.898829. These fitted references are neither reported sales nor a causal services effect.

F=L(α,δ)(100000 million USD)2,r=(α,δ/(1 million USD)),q=(α,δ/(100000 million USD))F=\frac{L(\alpha,\delta)}{(100000\ {\rm million\ USD})^2},\qquad r=(\alpha,\delta/(1\ {\rm million\ USD})),\quad q=(\alpha,\delta/(100000\ {\rm million\ USD}))

Both coordinate systems are dimensionless but use different reference amounts for δ. Keep F, actual inputs, initial physical α=1, δ=0 and η=1 identical. Euclidean gradients depend on the coordinates, so paths differ. Convert δ back to million USD for comparison.

Hr=[1.014858547260.0000017040.0000017040.00000000002],Hq=[1.014858547260.17040.17040.2]H_r=\begin{bmatrix}1.01485854726&0.000001704\\0.000001704&0.00000000002\end{bmatrix},\qquad H_q=\begin{bmatrix}1.01485854726&0.1704\\0.1704&0.2\end{bmatrix}
Curvature and step conditions in the specified dimensionless coordinates
Quantityr: δ reference 1 million USDq: δ reference 100,000 million USD
λmin1.713889585 E-110.165801859387
λmax1.0148585472631.049056687873
κ₂=λmax/λmin59,213,764,765.0186.327170828
Open η upper bound 2/λmax1.9707179935511.906474667309

η=1 satisfies the spectral convergence condition in both systems. But r barely reduces error in the low-curvature direction. κ describes the normalized objective in a selected coordinate metric, not an intrinsic business risk or economic importance. The graph compares the same objective’s excess loss relative to its initial value.

Physical coefficients and diagnostics after 20 iterations
Quantityr coordinatesq coordinates
α1.0180262725511.000109463486
δ (million USD)0.00000380410,725.865263607
F−F*0.0010383928820.000000685978
Gradient norm in chosen coordinates0.0000001886630.000476941222
Think first, then reveal: Does a gradient norm below 10⁻⁶ in r establish adequate optimization?

Its gradient norm is approximately 0.000000188663, yet δ remains about 11,007.9 million USD from the analytic optimum, with excess loss approximately 0.001038392882. When the smallest eigenvalue m is tiny, the strong-convexity bound F−F*≤‖∇F‖²/(2 m) need not be small. Stopping tolerances require coordinate scales, objective normalization and a target accuracy.

Think first, then reveal: Why are r-GD and q-GD different despite representing the same predictions?

With r=Dq and D=diag(1,100000),∇qF=Dᵀ∇rF at the same physical point. Mapping a q step back gives r_next=r−ηDDᵀ∇rF, a preconditioned step rather than ordinary r-GD. Reparameterization changes the metric defining steepest descent; it does more than relabel decimal positions.

Think first, then reveal: Does exactly zero gradient guarantee a global minimum for every function?

No. The illustrative function x²−y² has zero gradient at its saddle point. Our three losses are positive-definite quadratics with analytic minima and exact gap identities. Do not transfer these guarantees to arbitrary neural-network objectives.

Think first, then reveal: If loss is multiplied by 100, should η stay the same?

A positive multiplier preserves the minimizer but multiplies gradient and Hessian by 100. Divide η by 100 to preserve the same coordinate path. A learning-rate claim without objective normalization and parameter units is not reproducible.

Actual filings stay fixed at every iterate. Unequal 53/52-week fiscal years, nominal units, prices, quantities and exchange rates remain. This computation does not validate future company performance or valuation.

Source: SEC EDGAR · Apple 2024 Form 10-K actual category sales · Actual-input CSV

All two-dimensional iterates, physical-unit recovery, losses and gradients CSV · Dimensionless coordinates, exact Hessians and spectral conditions CSV · Actual inputs, units, calculations and SHA-256

기초Foundations

39. 알고리즘 실험의 기록과 결론39. Record and conclude an optimization experiment

실험 전에는 목적함수·단위·정규화·정의역, 시작점, 보폭 방식, 필요한 L·μ·조건수의 근거를 적습니다. 실험 중에는 손실·기울기·이동량·보폭·비유한 결과를 기록합니다. 실험 후에는 어떤 종료 기준을 만족했고 무엇을 인증하지 못했는지 정확히 씁니다.

이론 결론도 나누어 말합니다. 매끄러움과 아래 유계성은 작은 기울기를, 볼록성과 최소 달성은 함수값 오차율을, 강볼록성은 더 빠른 율과 거리 인증을 줄 수 있습니다. 비볼록 문제의 정지점과 전역 최소를 같은 말로 바꾸지 않습니다.

다음 장에서는 ‘수렴한다’는 문장을 수열·함수열·Cauchy 조건·정량 오차로 더 엄밀하게 풉니다. 실제 관측 자료는 유한하지만 그 자료로 정의한 알고리즘의 이론 수열은 무한 반복을 가정할 수 있습니다. 두 시간축을 끝까지 구별합니다.

Before an experiment, state objective, units, normalization, domain, start, step rule and justified constants. During it, record loss, gradient, movement, accepted steps and numerical failures. Afterwards, state the actual stopping condition and certificate.

Different assumptions support different conclusions: small gradients, convex objective rates, or strong-convexity distance and geometric guarantees. A nonconvex stationary point is not a global optimum.

The next chapter formalizes sequence and function convergence, Cauchy conditions and quantitative error. Finite observed datasets and infinite theoretical algorithmic sequences have different roles.

기초Foundations

40. 증명·실험을 함께 읽을 공식 자료40. Official readings for proofs and experiments

MIT 6.7220, Lecture 12에서 기울기 반복·L-매끄러움·감소 정리·작은 기울기 보장과 볼록 함수값 보장의 차이를 읽으세요. 기울기 수렴과 전역 최적의 차이를 설명하는 예제도 비교합니다.

저자 공개본 Boyd·Vandenberghe, Convex Optimization의 9.2~9.3은 선탐색·경사법·조건수의 실험을 연결합니다. 이 장의 c=1/2 Armijo는 직접 유도한 감소 부등식으로 검산하고, 참고서의 파라미터 범위와 표기 차이를 구별하세요.

더 넓은 기울기 계산·확률적 경사하강법 입구는 MIT 6.390, Gradient Descent에서 볼 수 있습니다. 여기서는 뒤 과목의 확률·표본 이론을 앞당기지 않고, 정확 기울기의 기본 보장을 먼저 충분히 익힙니다.

Python · R · 정규화한 실제 자료의 이차 손실 CSV

Read MIT 6.7220, Lecture 12 for smoothness, descent and the distinction between small-gradient and convex objective guarantees.

The authors' Convex Optimization, Sections 9.2–9.3, connects line search, gradient methods and conditioning experiments. Compare parameter conventions with our directly justified c=1/2 Armijo rule.

MIT 6.390, Gradient Descent introduces broader learning applications and stochastic updates. Later subjects supply their probability assumptions; master deterministic guarantees first.

Python · R · Normalized actual-data quadratic systems CSV

Python·R 코드 실행 방법Run the Python/R companions

자료 묶음을 풀고 코드와 실제데이터 폴더를 함께 두세요. 터미널에서 코드 파일이 있는 폴더로 이동해 아래 명령을 실행합니다. 코딩이 처음이라면 손계산과 웹 실습을 먼저 하고, 데이터 사이언스 입문에서 코드를 배운 뒤 돌아와도 됩니다.Extract the bundle, keeping the scripts beside the data folder. In a terminal, enter the script folder and run the commands below. Beginners can complete hand calculations and browser labs first, returning to code after studying introductory data science.

python math21-reproduce.py
Rscript --vanilla --encoding=UTF-8 math21-reproduce.R

결과 파일은 각 코드에 지정된 결과 폴더에 저장됩니다. CSV 원자료는 덮어쓰지 않습니다.Result files are saved in the result directory specified by each script; the input CSVs are not overwritten.

영상·학자·함께 읽기Videos, thinkers and guided reading

본문의 질문을 넓히는 선택 학습입니다. 영상을 보기 전 질문을 먼저 읽고, 자신의 답을 쓴 뒤 해설과 비교하세요. 자료의 언어·선수 지식은 각 항목에 표시했습니다.Optional extensions to the chapter. Read the question first, write your answer, then compare with the explanation. Language and prerequisites are indicated below.

경사하강법: 곡률과 보폭을 함께 보기Gradient Descent: Downhill to a Minimum

MIT OpenCourseWare 18.065 · Gilbert Strang

본문의 공식 강의에서 이차함수의 경사하강법을 봅니다. 보폭 선택·조건수와 수렴 조건을 이 장의 실제 계산에 연결하세요.Watch the official quadratic-gradient-descent lecture and connect step selection and conditioning to our actual calculations.

교재 안의 YouTube 플레이어에서 재생합니다. 원영상에서 제공하는 자막은 플레이어의 CC·설정에서 선택할 수 있습니다.Playback stays in this chapter’s YouTube player. Available captions can be selected through CC/settings.

보고 읽은 뒤 답하기Respond after watching/reading 기울기 반대로 움직이면 아무 보폭이나 손실이 감소하나요?Does every step opposite the gradient reduce loss?

생각을 점검하는 해설Check your reasoning

유한한 보폭에는 곡률 조건이 필요합니다. 이차함수에서도 η=2 또는 그보다 큰 값에서 순환·발산할 수 있음을 가구와 국가 자료의 계산으로 확인합니다.Finite steps need curvature control. The household and country quadratics demonstrate cycling or divergence at excessive rates.

오귀스탱루이 코시 · 반복을 수렴 조건과 함께 읽기Augustin-Louis Cauchy: read iteration together with convergence conditions

University of St Andrews · MacTutor

대학 소개에서 코시(1789–1857)의 급수 수렴·발산과 1821년 해석학 교재 부분을 읽습니다. 앞 20개 계산값을 관찰하는 것과 무한 반복의 수렴 조건을 증명하는 것을 구별해 보세요.Read about Cauchy(1789–1857), series convergence/divergence and his 1821 analysis text. Distinguish observing twenty computed values from proving a condition for convergence of the infinite iteration.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 계산 표가 20행 있으면 무한 반복의 수렴을 증명했나요?Do twenty computed rows prove convergence of an infinite iteration?

생각을 점검하는 해설Check your reasoning

아닙니다. 이 장의 이차식에서는 오차 반복행렬의 고유값 절댓값이 모두 1보다 작다는 근거를 함께 제시합니다. 표는 그 결론을 실제 입력에서 확인하는 유한 계산입니다.No. Our quadratic guarantee also checks that every error-iteration eigenvalue has magnitude below one. Tables are finite checks on actual inputs.

강볼록성·선 탐색·조건수의 수렴 분석Strong convexity, line search and conditioning

Boyd and Vandenberghe · Convex Optimization §9.3.1, printed pp.466–468

저자 공식 PDF에서 Hessian 하한·상한 가정과 정확/후퇴 선 탐색을 읽습니다. 책의 가변 보폭 분석과 이 장의 고정 η 스펙트럼 식을 구별합니다.Read Hessian bounds and exact/backtracking line-search analysis in the authors’ PDF. Distinguish those varying-step results from our fixed-η spectral formula.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 서로 단위가 다른 원계수의 Hessian 숫자만으로 조건수를 경제적 중요도로 읽나요?Does a numerical Hessian in mixed raw units establish economic importance?

생각을 점검하는 해설Check your reasoning

좌표와 목적의 척도를 먼저 정합니다. 이 장의 조건수는 명시한 무차원 좌표에서 반복의 기하를 설명하며, 변수의 인과적 중요도는 아닙니다.Specify coordinate and objective scales first. These condition numbers describe iteration geometry in stated dimensionless coordinates, not causal variable importance.

매끄러운 볼록함수의 고정 보폭 보장A fixed-step guarantee for smooth convex functions

Sébastien Bubeck · Convex Optimization:Algorithms and Complexity §3.2, Theorem3.3

저자 공개 논문에서 β-Lipschitz gradient와 볼록성, η=1/β인 정리 3.3을 읽습니다. 조건이 바뀌면 같은 보장을 적용할 수 없습니다.Read convexity, β-Lipschitz gradients and Theorem 3.3 with η=1/β in the author’s public monograph. Guarantees depend on those assumptions.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 매끄럽기만 하면 작은 gradient가 전역 최소를 보장하나요?Does smoothness alone make a small gradient a global-minimum guarantee?

생각을 점검하는 해설Check your reasoning

아닙니다. 볼록성·해의 존재·보폭 조건을 별도로 확인합니다. 안장점에서는 gradient가 0이어도 최소가 아니며, 매우 작은 곡률에서는 정지 허용오차의 해석도 주의해야 합니다.No. Check convexity, existence and step conditions separately. Saddles can have zero gradient; very low curvature also complicates stopping-tolerance interpretation.

연습문제 · 계산에서 설명과 증명까지Exercises: calculation, explanation and proof

먼저 혼자 풀고 풀이를 여세요. 숫자와 함께 단위·포함 기준·계산 이유를 확인하세요.Attempt each problem before opening its solution. Check units, inclusion rules and the reason for the calculation.

1. 업데이트 세 번Three updates

f(x)=(x−2)²,x₀=4,η=1/4에서 x₁,x₂,x₃를 계산하세요.

For f=(x−2)²,x₀=4,η=1/4, compute the first three updates.

풀이와 확인할 이유Solution and explanation

기울기는 2(x−2)이므로 x다음=x−(x−2)/2=(x+2)/2입니다. 따라서 4→3→2.5→2.25입니다. 오차 xₖ−2는 매번 절반이고 함수값 오차는 1/4배입니다.

The gradient is 2(x−2), giving xnext=(x+2)/2. Thus the points are 3,2.5,2.25. Parameter error halves and objective error quarters each step.

2. 기울기를 새로 구하지 않으면Reusing the initial gradient

f=½x²,x₀=4,η=1/2에서 첫 기울기 4를 계속 사용하는 방법과 실제 경사하강법을 세 번 비교하세요.

For ½x²,x₀=4,η=1/2, compare three updates using the fixed initial gradient with true gradient descent.

풀이와 확인할 이유Solution and explanation

고정한 기울기를 계속 쓰면 4→2→0→−2입니다. 현재 기울기를 다시 구하면 4→2→1→1/2입니다. 첫 단계가 같아도 이후는 다른 알고리즘입니다. 경사하강법은 현재점의 기울기를 사용합니다.

Reusing four gives 4,2,0,−2. Recomputing the gradient gives 4,2,1,1/2. The same first update does not make them the same algorithm.

3. 국소 모형의 해A local-model minimizer

현재 g=(3,4),η=0.1에서 gᵀd+‖d‖²/(2η)의 유일 최소와 이동 길이를 구하세요.

For g=(3,4),η=0.1, minimize gᵀd+‖d‖²/(2η) and find the movement length.

풀이와 확인할 이유Solution and explanation

정상식 g+d/η=0에서 d=(−0.3,−0.4)입니다. 헤시안 10I가 양의 정부호라 유일 최소입니다. 길이는 0.5=η‖g‖입니다. 단위방향 −g/‖g‖=(−0.6,−0.8)과 실제 이동벡터를 구별합니다.

Stationarity gives d=(−0.3,−0.4); positive definite Hessian 10I makes it unique. Its length is 0.5, while the unit direction is (−0.6,−0.8).

4. 음의 인자도 수렴A negative factor can converge

f=½·2x²,x₀=1,η=3/4의 반복 인자와 처음 세 점, 수렴 여부를 구하세요.

For f=½·2x²,x₀=1,η=3/4, find the recurrence factor, three updates and convergence behavior.

풀이와 확인할 이유Solution and explanation

인자는 1−2η=−1/2입니다. x₁=−1/2,x₂=1/4,x₃=−1/8입니다. 부호는 번갈아 바뀌지만 절댓값은 반감하므로 0으로 수렴합니다. 함수값은 매번 1/4배입니다.

The factor is −1/2, producing −1/2,1/4,−1/8. Alternating signs coexist with convergence to zero; objective values quarter each step.

5. 경계 보폭The stability boundary

f=½·2x²,x₀=1에서 η=1일 때와 η=1.1일 때를 비교하세요.

For f=½·2x²,x₀=1, compare η=1 and η=1.1.

풀이와 확인할 이유Solution and explanation

η=1의 인자는 −1이라 ±1을 왕복하고 함수값 1이 일정합니다. η=1.1의 인자는 −1.2라 절댓값이 1.2배로 커집니다. 안정 조건 0<η<1의 경계와 바깥입니다.

The factors are −1 and −1.2. The first cycles at ±1 with constant objective; the second diverges in magnitude. Stability requires the strict interval 0<η<1.

6. 특수 시작점의 함정A special initial point

같은 이차함수에서 불안정한 η=100으로 x₀=0을 실험했더니 계속 0입니다. 모든 시작점의 안정성을 증명했나요?

For the same quadratic, η=100 and x₀=0 remain at zero. Does this prove stability for every start?

풀이와 확인할 이유Solution and explanation

아닙니다. 0은 기울기 0이라 언제나 고정됩니다. x₀=1에서는 인자 1−200=−199로 폭주합니다. 보폭 안정성 주장은 특정한 영 초기성분에 가려질 수 있으므로 모든 시작점이라는 범위를 확인합니다.

No. Zero is always fixed, but x₀=1 is multiplied by −199 and diverges. A special initial component can hide an unstable direction.

7. 오차율 제곱Squaring an error rate

위치 오차가 0.8ᵏ이고 f=½a(x−x*)²라면 함수값 오차의 인자는 무엇인가요?

If parameter error is 0.8ᵏ for f=½a(x−x*)², what is the objective-error factor?

풀이와 확인할 이유Solution and explanation

함수값 오차는 a·0.64ᵏ/2입니다. 위치의 0.8과 함수값의 0.64는 서로 다른 한 단계 비율입니다. 로그 그래프에서도 함수값의 기울기는 위치 로그오차 기울기의 두 배입니다.

The objective error is (a/2)0.64ᵏ. Distinguish the parameter factor 0.8 from the objective factor 0.64; logarithmic slopes differ by a factor of two.

8. 매끄러움 상수Smoothness and strong convexity constants

f(x,y)=½(x²+10y²)의 가장 작은 전역 L과 가장 큰 강볼록 상수 μ를 구하세요.

Find the tight global L and μ for ½(x²+10y²).

풀이와 확인할 이유Solution and explanation

H=diag(1,10)이라 최대 고유값 10이 최소 L이고 최소 고유값 1이 최대 강볼록 μ입니다. κ=10입니다. 모든 시작점의 고정 보폭 수렴 구간은 0<η<0.2입니다.

The Hessian diag(1,10) gives tight L=10 and μ=1, condition number ten. All-start fixed-step convergence holds for 0<η<0.2.

9. C∞와 L-매끄러움Infinitely differentiable versus L-smooth

x⁴가 무한 번 미분 가능한데도 실수 전체 L-매끄럽지 않은 이유를 설명하세요. [−2,2]의 헤시안 절댓값 상한은?

Why is x⁴ not globally L-smooth despite infinite differentiability? Bound its Hessian on [−2,2].

풀이와 확인할 이유Solution and explanation

f″=12x²가 무한히 커져 전역 유한 L이 없습니다. [−2,2]에서는 최대 48입니다. 그러나 구간 안의 상한 48은 반복이 그 구간에 머문다는 검증 없이 전역 안전값으로 쓰면 안 됩니다.

Its second derivative 12x² is globally unbounded but at most 48 on the interval. That local bound cannot guarantee unrestricted iterates remain in the interval.

10. 감소 부등식의 수치 검산Checking the descent bound numerically

f=½(x²+10y²), 현재 (1,1),η=0.1에서 다음 점·실제 손실·L=10 감소 상계를 비교하세요.

For ½(x²+10y²) at (1,1),η=0.1, compare the next objective with its L=10 bound.

풀이와 확인할 이유Solution and explanation

기울기 (1,10),제곱노름 101입니다. 다음 점은 (0.9,0),손실 0.405입니다. 상계는 5.5−0.1(1−0.5)101=0.45라 실제 값 0.405≤0.45입니다. 감소 보장 상계와 실제 손실을 같은 숫자로 취급하지 않습니다.

The gradient is (1,10), squared norm 101. The next point (0.9,0) has objective 0.405. The bound is 5.5−0.05·101=0.45, correctly above the actual value.

11. 전역 L의 과소추정Underestimating L

곡률이 10인 스칼라 이차함수에서 L을 1로 잘못 알고 η=1을 택하면 어떻게 되나요?

What happens if a scalar quadratic of curvature ten is treated as L=1 and given step one?

풀이와 확인할 이유Solution and explanation

정확 인자는 1−η·10=−9라 비영 초기값의 절댓값이 매번 9배 커집니다. 잘못 추정한 L로 계산한 안전 보폭은 실제 이론 가정을 만족하지 않습니다. 전역 상한은 검증해야 합니다.

The true factor is −9, causing divergence from nonzero starts. The claimed safety bound used an invalid smoothness estimate.

12. 작은 기울기 반복 상계A small-gradient iteration bound

전역 L-매끄럽고 아래로 유계이며 f(x₀)−f_low≤10,η=0.1≤1/L입니다. 기울기 0.5 이하인 점을 만나는 충분한 반복 수를 구하세요.

Under the global smoothness/lower-bound assumptions, f(x₀)−f_low≤10 and η=0.1≤1/L. Give a sufficient count to encounter gradient norm at most 0.5.

풀이와 확인할 이유Solution and explanation

상계 2·10/(0.1·0.5²)=800입니다. 처음 800점 중 적어도 하나가 조건을 만족합니다. 마지막 점이라고 단정하거나 800이 필요한 최소 횟수라고 말하지 않습니다.

The sufficient count is 2·10/(0.1·0.5²)=800. At least one of those first points qualifies; this is neither a last-point claim nor a necessary count.

13. 정지점 보장의 범위Scope of a stationarity guarantee

비볼록에서 ‖∇f(xₖ)‖→0이 증명되었다면 전역 최소값 수렴과 좌표 수렴도 자동인가요?

Does vanishing gradient norm for a nonconvex objective automatically prove global objective optimality and iterate convergence?

풀이와 확인할 이유Solution and explanation

아닙니다. 최대·안장도 기울기가 0이고, softplus의 안전한 반복은 좌표가 −∞로 가면서 기울기만 0에 접근합니다. 증명이 직접 다룬 대상과 추가 가정을 구별해야 합니다.

No. Maxima and saddles are stationary, and the softplus example has iterates tending to negative infinity while gradients vanish. Additional conclusions need additional assumptions.

14. Softplus의 미달성Softplus and nonattainment

f=ln(1+eˣ)의 고정 양수 보폭 반복이 유한한 a로 수렴한다고 가정해 모순을 만드세요.

Assume a positive fixed-step softplus iteration converges to a finite a and derive a contradiction.

풀이와 확인할 이유Solution and explanation

차이 xₖ₊₁−xₖ=−ησ(xₖ)는 연속성으로 −ησ(a)<0에 갑니다. 그러나 유한 수렴 수열의 연속한 항 차이는 0이어야 하므로 모순입니다. 수열이 감소하므로 −∞로 가고 f의 inf 0은 달성되지 않습니다.

Its increments would tend to −ησ(a)<0, whereas increments of a finite convergent sequence tend to zero. Monotone decrease therefore tends to negative infinity, approaching an unattained infimum.

15. 볼록 함수값 상계A convex objective bound

볼록·L-매끄럽고 최소가 달성됩니다. ‖x₀−x*‖≤3,η=0.1≤1/L일 때 마지막 점의 gap≤0.01을 보장하는 충분한 k는?

Assume convex L-smoothness and attained minimum, distance at most three and η=0.1≤1/L. Give sufficient k for last-iterate objective gap at most 0.01.

풀이와 확인할 이유Solution and explanation

gap≤9/(0.2k)=45/k입니다. 45/k≤0.01에서 k≥4500이 충분합니다. 실제 경로가 더 빨리 도달할 수 있고, 이 상계는 최소 달성·볼록·보폭 조건 아래 마지막 함수값에 적용됩니다.

The bound is 9/(0.2k)=45/k, so 4500 suffices. It is a sufficient worst-case count, potentially much larger than the observed count.

16. 강볼록 함수값율A strongly convex objective rate

μ=1,L=10,η=0.1,초기 gap≤5에서 k번 뒤의 일반 강볼록 함수값 상계를 쓰세요.

For μ=1,L=10,η=0.1 and initial gap at most five, state the general strong-convexity bound.

풀이와 확인할 이유Solution and explanation

인자 1−ημ=0.9이므로 gap≤5·0.9ᵏ입니다. 이 보장은 함수값 오차의 일반 상계입니다. 특정 이차함수 고유방향의 더 빠른 제곱율과 혼동하지 않습니다.

The objective gap is at most 5·0.9ᵏ. This general objective bound differs from exact squared modal factors for a special quadratic.

17. 기울기 인증의 상수Constants in a gradient certificate

μ=0.01,L=10,기울기 노름 0.001일 때 함수값 gap과 거리의 보증 상계를 구하세요.

For μ=0.01,L=10 and gradient norm 0.001, bound objective gap and distance.

풀이와 확인할 이유Solution and explanation

gap≤10⁻⁶/(2·0.01)=0.00005, 거리≤0.001/0.01=0.1입니다. 기울기 숫자만 보고 거리도 0.001이라고 판단하면 틀립니다. 좌표와 μ가 인증에 포함됩니다.

The bounds are gap≤0.00005 and distance≤0.1. The gradient number alone is not the parameter-distance bound.

18. 작은 μ의 약한 인증A weak certificate with tiny μ

기울기 10⁻⁶,μ=10⁻¹²이면 일반 강볼록 거리 상계는 얼마인가요?

If gradient norm is 10⁻⁶ and μ=10⁻¹², what is the strong-convexity distance bound?

풀이와 확인할 이유Solution and explanation

‖x−x*‖≤‖g‖/μ=10⁶입니다. 상계가 매우 느슨할 수 있지만 작은 기울기가 작은 거리의 증거가 되려면 곡률 하한이 필요하다는 점을 보여 줍니다. μ를 무시한 종료 해석은 위험합니다.

It is 10⁶. The bound may be loose, but demonstrates why a small gradient requires curvature context before implying a small distance.

19. 두 고유방향 반복Two eigendirection recurrences

H=diag(1,10),x*=0,x₀=(1,1),η=0.1에서 xₖ를 k≥1에 대해 구하세요.

For H=diag(1,10),x*=0,x₀=(1,1),η=0.1, find xₖ for k≥1.

풀이와 확인할 이유Solution and explanation

첫 성분 인자는 0.9,둘째는 0입니다. 따라서 xₖ=(0.9ᵏ,0),k≥1입니다. 큰 곡률 방향은 즉시 사라지고 작은 방향이 남아 느려집니다. k=0에서는 초기 두 번째 성분 1을 별도로 보존합니다.

The factors are 0.9 and zero, so xₖ=(0.9ᵏ,0). The steep direction disappears immediately while the shallow one controls later progress. Treat the initial point separately.

20. 조건수와 최적 고정 보폭Conditioning and a best fixed step

μ=1,L=10인 양의 정부호 이차함수의 최악 방향 최적 고정 보폭·위치율·함수값율을 구하세요.

For an SPD quadratic with μ=1,L=10, find the best fixed worst-direction step and parameter/objective factors.

풀이와 확인할 이유Solution and explanation

η*=2/11,ρ=9/11입니다. 위치 노름 상계는 (9/11)ᵏ배,함수값 gap 상계는 (81/121)ᵏ배입니다. 이는 고정 하나의 보폭에 대한 최악 방향 기준입니다.

The step is 2/11. Parameter norm contracts by at most 9/11 and objective gap by at most 81/121 per iteration.

21. 큰 고유방향이 없는 시작A missing unstable eigendirection

H=diag(1,10),η=0.3은 전체 안정 범위를 벗어납니다. x₀=(1,0)만으로 실험하면 무엇을 놓치나요?

For H=diag(1,10),η=0.3, what does a test starting only at (1,0) conceal?

풀이와 확인할 이유Solution and explanation

첫 성분 인자 0.7이라 수렴하지만 두 번째 인자는 −2로 불안정합니다. 초기 둘째 성분이 0이라 그것을 못 봅니다. x₀=(1,0.001)에서는 둘째 절댓값이 매번 2배 커집니다. 전체 시작점 보장과 특정 시작의 성공을 구별합니다.

The first factor 0.7 converges, but the second factor −2 is unstable. A zero initial second component hides it; a nonzero perturbation doubles in magnitude each step.

22. 영 고유값 방향A zero-eigenvalue direction

f(x,y)=½x²에서 x₀=(2,5),η=1을 적용하세요. 해가 원점 하나인가요?

Apply η=1 to f=½x² from (2,5). Is the origin the only solution?

풀이와 확인할 이유Solution and explanation

기울기 (x,0)이므로 한 번 뒤 (0,5)이고 이후 그대로입니다. 최소점 집합은 {(0,y):y∈R}입니다. 영 고유방향은 보존되며 강볼록성이 없으므로 유일 최소를 주장할 수 없습니다.

The gradient (x,0) gives (0,5), then no movement. Every point with x=0 minimizes; the zero-curvature coordinate stays unchanged and uniqueness fails.

23. 좌표 척도로 등방화Scaling to isotropic curvature

f=½(x₁²+100x₂²),x₀=(1,1)에서 x₁=θ₁,x₂=0.1θ₂로 바꾸세요. 새 시작점과 η=1의 다음 점은?

For ½(x₁²+100x₂²) from (1,1), use x₁=θ₁,x₂=0.1θ₂. Find the transformed start and next point with step one.

풀이와 확인할 이유Solution and explanation

θ₀=(1,10),F=½(θ₁²+θ₂²)라 η=1에서 θ₁반복=(0,0)입니다. 원좌표도 (0,0)입니다. 원좌표에서 같은 η=1이면 둘째 인자 −99로 불안정합니다. 같은 실제 시작점을 맞춘 뒤 좌표별 알고리즘을 비교해야 합니다.

The transformed start is (1,10), and F=½(θ₁²+θ₂²), so one step gives zero. In original coordinates step one has unstable second factor −99. Compare the same physical initial point.

24. 척도변환의 업데이트Mapping a scaled update back

x=Sθ,F=f(Sθ)에서 θ경사하강법을 원좌표로 써 보세요. S가 직교일 때는?

Express a gradient step in θ for F=f(Sθ) back in x coordinates. What if S is orthogonal?

풀이와 확인할 이유Solution and explanation

∇θF=Sᵀ∇ₓf이므로 x다음=x−ηSSᵀ∇ₓf입니다. S가 직교이면 SSᵀ=I라 원래 경사하강법과 같습니다. 일반 대각척도에서는 다른 방향별 보폭이 생깁니다.

The mapped update is xnext=x−ηSSᵀ∇ₓf. Orthogonal S gives the original step; general scaling changes directional step lengths.

25. 목적함수 배율과 학습률Objective scaling and learning rate

F=100f에서 f의 η=0.1 경로를 재현하려면 어떤 보폭을 쓰나요? 조건수는 바뀌나요?

For F=100f, what step reproduces the η=0.1 path of f? Does conditioning change?

풀이와 확인할 이유Solution and explanation

새 보폭은 0.001입니다. 0.001∇F=0.1∇f로 같은 이동입니다. L,μ는 모두 100배라 조건수 비는 같고 안전 보폭은 1/100배입니다. 목적함수 배율만 바꾸어 조건수를 개선하지는 못합니다.

Use 0.001. Both curvature constants scale by 100, leaving their ratio unchanged and shrinking safe steps by 100.

26. Armijo 충분 보폭A sufficient Armijo step

L=10,c=1/2인 Armijo 검사를 항상 통과시키는 충분한 η 범위를 감소 정리로 구하세요.

For L=10 and Armijo c=1/2, derive a sufficient positive step range.

풀이와 확인할 이유Solution and explanation

1−Lη/2≥c이면 충분하므로 η≤2(1−c)/L=0.1입니다. 0<η≤0.1이면 보장됩니다. 더 큰 η도 특정 현재 방향에서 통과할 수 있으므로 이 조건을 필요조건이라고 말하지 않습니다.

The descent bound suffices when 1−Lη/2≥c, giving 0<η≤0.1. Larger steps may still pass for particular directions; this is sufficient, not necessary.

27. 되돌아가기 계산A backtracking calculation

f=½(x²+10y²),현재 (1,1),η₀=1,β=1/2,c=1/2에서 첫 수용 보폭을 구하세요.

For ½(x²+10y²) at (1,1),η₀=1,β=1/2,c=1/2, find the first accepted step.

풀이와 확인할 이유Solution and explanation

g=(1,10),gᵀHg=1001,‖g‖²=101입니다. 이차식의 Armijo 조건은 η≤101/1001≈0.100899입니다. 시험 1,1/2,1/4,1/8은 실패하고 1/16이 통과합니다. 그때 실제 손실은 1.142578125,요구 상한은 2.34375입니다.

The exact quadratic test requires η≤101/1001. Trials 1,1/2,1/4,1/8 fail; 1/16 passes. Its objective is 1.142578125 against required upper bound 2.34375.

28. 정확 선탐색Exact line search

같은 f=½(x²+10y²),현재 (1,1)의 정확 음의 기울기 선탐색 보폭을 구하고 최적 고정 보폭과 비교하세요.

Find the exact negative-gradient line-search step for ½(x²+10y²) at (1,1), and compare the best fixed step.

풀이와 확인할 이유Solution and explanation

ηline=‖g‖²/(gᵀHg)=101/1001≈0.100899입니다. 최악 방향 최적 고정 보폭은 2/11≈0.181818로 다릅니다. 전자는 현재 방향의 실제 최소,후자는 모든 방향의 최악 비율을 균형 맞추는 값입니다.

It is 101/1001≈0.100899, while the best fixed worst-direction step is 2/11. They optimize different criteria and need not coincide.

29. 영 기울기 선탐색Zero-gradient line search

정확 선탐색 식 ‖g‖²/(gᵀHg)에 g=0을 넣어 η=0이라고 정해도 되나요?

Can the exact line-search fraction ‖g‖²/(gᵀHg) simply be set to zero at g=0?

풀이와 확인할 이유Solution and explanation

분수는 0/0이라 정의되지 않습니다. 이 식을 계산하지 않고 정지점으로 별도 처리합니다. 이후 분류는 볼록성·헤시안 등으로 합니다. 코드가 NaN을 반환했다면 그것을 수학적 보폭 0과 같은 것으로 표기하지 않습니다.

The expression is undefined 0/0. Handle stationarity separately and classify the point using additional structure. A NaN result is not a defined mathematical step size.

30. 유한 되돌아가기 횟수A finite backtracking count

η₀=1,β=1/2이고 η≤0.1이면 통과가 보장됩니다. 충분한 재축소 횟수 j를 구하세요.

Starting at one with β=1/2, acceptance is guaranteed for η≤0.1. Give a sufficient shrink count.

풀이와 확인할 이유Solution and explanation

2⁻ʲ≤0.1을 만족하는 최소 정수는 4입니다. 따라서 늦어도 η=1/16에서 보장이 적용됩니다. 특정 함수·방향에서는 그 전에 통과할 수 있습니다. 이것은 한 선탐색의 종료 보장이지 전체 최적 수렴 횟수가 아닙니다.

The smallest j with 2⁻ʲ≤0.1 is four. Acceptance is guaranteed by 1/16, possibly earlier. This concerns one line search, not the full optimization complexity.

31. 한 점 곡률은 부족One-point curvature is insufficient

x⁴의 현재점 0에서 f″=0입니다. 이것으로 모든 점에서 임의의 보폭이 안전하다고 결론 낼 수 있나요?

Because x⁴ has zero curvature at zero, are arbitrary steps safe from every point?

풀이와 확인할 이유Solution and explanation

없습니다. 0 자체는 기울기 0이라 고정되지만 다른 점의 곡률 12x²는 무한히 커집니다. 한 점에서의 곡률은 전역 L 상한이 아닙니다. 보폭 분석에는 실제 경로의 영역에서 유효한 조건이 필요합니다.

No. Zero is a special fixed point, while curvature 12x² is unbounded elsewhere. A pointwise Hessian does not supply a global smoothness bound.

32. 최대점에 정지Stopping at a maximum

f=x⁴/4−x³/3−x²에서 x₀=0으로 경사하강법을 시작하세요. 기울기 종료와 전역 최소를 비교하세요.

Start gradient descent at zero for x⁴/4−x³/3−x². Compare stationarity stopping with global optimality.

풀이와 확인할 이유Solution and explanation

f′=x(x−2)(x+1)이므로 0에서 항상 업데이트가 0입니다. 그러나 f″(0)=−2라 국소 최대이고 전역 최소값 −8/3은 x=2에서 얻습니다. 정확한 기울기 종료조차 비볼록 전역 최적의 인증은 아닙니다.

The derivative vanishes, so every update remains zero. Yet f″(0)=−2 gives a local maximum, whereas the global minimum is −8/3 at two.

33. 국소 최소에 정지Stopping at different minima

같은 사차함수에서 x₀=−1로 시작하면 어떤 답을 얻나요? 초기점을 2로 바꾸면?

For the same quartic, compare exact starts −1 and 2.

풀이와 확인할 이유Solution and explanation

−1과 2는 둘 다 정지점이라 그대로입니다. −1의 값 −5/12는 국소 최소이나 전역값 −8/3보다 큽니다. 2는 전역 최소입니다. 두 실행 모두 기울기 0인데 최적성 범위가 다릅니다.

Both remain fixed. The value −5/12 at −1 is a nonglobal local minimum; −8/3 at two is global. Identical zero-gradient stopping has different optimality scope.

34. 안장의 두 좌표Two coordinates near a saddle

f=x²−y²,η=0.1에서 x₀=(1,0)과 (1,0.001)의 좌표 반복식을 비교하세요.

For x²−y² and η=0.1, compare starts (1,0) and (1,0.001).

풀이와 확인할 이유Solution and explanation

x인자는 0.8,y인자는 1.2입니다. 첫 시작은 (0.8ᵏ,0)으로 원점 안장에 갑니다. 둘째는 (0.8ᵏ,0.001·1.2ᵏ)라 y가 커집니다. 이 함수는 아래로 유계가 아니므로 11절의 기울기 수렴 정리를 적용할 수 없습니다.

The factors are 0.8 and 1.2. The first approaches the saddle along the x-axis; the second grows in y. The objective is unbounded below, so the lower-bounded stationarity theorem does not apply.

35. 아주 작은 보폭의 가짜 정지Tiny steps can fake stagnation

f=½x²,x=100,η=10⁻¹⁰에서 이동량과 기울기를 구하세요. 이동 10⁻⁷ 이하라는 기준은 무엇을 놓치나요?

For ½x² at x=100,η=10⁻¹⁰, compute gradient and movement. What does a movement tolerance 10⁻⁷ miss?

풀이와 확인할 이유Solution and explanation

기울기는 100,이동량은 10⁻⁸입니다. 이동 기준은 통과하지만 최소 0에서 아주 멉니다. 작은 보폭 때문에 생긴 작은 이동을 최적성으로 해석했습니다. 종료 기준에는 보폭·기울기·곡률을 함께 봅니다.

The gradient is 100 but movement only 10⁻⁸, so the criterion passes far from the optimum. Small movement can reflect a tiny step rather than optimality.

36. 저장 간격의 정지Rounding-induced stagnation

binary64에서 큰 수 x=10¹⁶에 0.1을 빼는 업데이트가 같은 저장값으로 남을 수 있습니다. 정확한 연산과 무엇이 다르나요?

A binary64 update subtracting 0.1 from 10¹⁶ can store the same value. How does this differ from exact arithmetic?

풀이와 확인할 이유Solution and explanation

정확한 실수 10¹⁶−0.1은 원래 수보다 작지만 그 크기의 저장 간격은 0.1보다 커 반올림 결과가 같을 수 있습니다. 저장값 불변은 정확 기울기 0의 증거가 아닙니다. 척도·정밀도·종료 이유를 확인해야 합니다.

The exact real result is smaller, but the storage spacing at that magnitude exceeds 0.1. Unchanged stored coordinates do not prove zero true gradient.

37. 로그 그래프의 0Zero on a logarithmic graph

이차함수를 한 번에 풀어 gap=0이 되었습니다. log gap을 그리기 위해 10⁻¹⁶으로 바꾸면 어떻게 표시해야 하나요?

If a quadratic reaches zero gap, how should a plot using a display floor 10⁻¹⁶ describe it?

풀이와 확인할 이유Solution and explanation

0의 로그는 정의되지 않으므로 실제 값 0과 표시용 하한 10⁻¹⁶을 구별합니다. 표에는 gap=0,그래프에는 하한 클리핑임을 명시할 수 있습니다. 10⁻¹⁶의 실제 오차가 남았다고 잘못 보고하지 않습니다.

Zero has no finite logarithm. Preserve exact zero in the table and label graph clipping as a display floor, not a remaining error of 10⁻¹⁶.

38. Gram 조건수Gram conditioning

full-column-rank X의 특잇값이 5와 1이면 H=XᵀX/n의 조건수는 얼마인가요?

If a full-column-rank X has singular values five and one, what is the condition number of H=XᵀX/n?

풀이와 확인할 이유Solution and explanation

X의 조건수는 5입니다. H의 고유값은 25/n과 1/n이라 조건수는 25=5²입니다. 1/n 목적함수 배율은 비를 바꾸지 않습니다. 열 랭크가 부족해 영 특잇값이 있다면 이 유한 양의 정부호 조건수 논의를 그대로 쓸 수 없습니다.

It is 25, the square of the condition number five for X. Scaling by 1/n cancels in the ratio. Rank deficiency would remove the positive lower eigenvalue.

39. 안정적인 이차 gapA stable quadratic gap

f(x)=10¹⁶+½x²의 최소값은 10¹⁶입니다. x가 작을 때 f−f* 대신 어떤 식으로 gap을 검산할 수 있나요?

For f=10¹⁶+½x², how can the gap be checked without subtracting nearly equal large values?

풀이와 확인할 이유Solution and explanation

정확한 gap=½x²를 직접 계산합니다. 큰 두 수의 뺄셈에서 개선량이 저장 정밀도에 묻히는 것을 피할 수 있습니다. 기준 상수를 바꿔도 최소점·기울기는 같지만 gap 계산의 수치 방식은 중요합니다.

Evaluate ½x² directly. This avoids losing small improvements in subtraction of the large baseline, although the mathematical minimizer and gradient are unchanged.

40. 국가 실제 손실의 고유율Country loss eigendirection factors

실제 GDP 요약의 정규화 H=diag(1,0.1)에서 η=20/11의 두 인자와 최악 위치율을 구하세요.

For the actual GDP-summary normalized Hessian diag(1,0.1), find both factors at η=20/11.

풀이와 확인할 이유Solution and explanation

첫 인자는 1−20/11=−9/11,둘째는 1−2/11=9/11입니다. 따라서 모든 위치 오차 노름은 정확한 이차 반복에서 매번 9/11배,함수값 gap은 81/121배입니다. 실측 GDP 시계열이 아니라 고정 자료의 계수 반복입니다.

They are −9/11 and 9/11. Parameter error norm contracts by 9/11 and quadratic gap by 81/121. These describe fitted-coefficient iterations, not observed GDP dynamics.

41. 국가 보폭 경계의 예외The country step boundary

같은 H=diag(1,0.1),η=2에서 두 인자는 무엇인가요? 첫 초기 오차가 0인 경우와 아닌 경우를 구별하세요.

For H=diag(1,0.1),η=2, distinguish a zero and nonzero initial first error component.

풀이와 확인할 이유Solution and explanation

인자는 −1과 0.8입니다. 첫 오차가 0이면 둘째만 줄어 수렴하지만, 첫 오차가 비영이면 그 성분이 왕복해 전체가 최소로 수렴하지 않습니다. 모든 시작점 수렴에는 엄격한 η<2가 필요합니다.

The factors are −1 and 0.8. A zero first error leaves only a converging component; a nonzero first error cycles. All-start convergence requires η<2.

42. 가구 실제 평균으로 한 번에Reaching actual household means

실제 가구 손실의 무차원 θ*= (2033/1440,4187/1440),H=I,θ₀=(0,0)입니다. η=1과 η=1/2의 반복을 쓰세요.

For dimensionless θ*=(2033/1440,4187/1440),H=I and zero start, compare η=1 and η=1/2.

풀이와 확인할 이유Solution and explanation

η=1은 θ₁=θ*이고 이후 그대로입니다. η=1/2는 θₖ=(1−2⁻ᵏ)θ*입니다. 두 평균은 고정 실측에서 계산한 목표이며 반복값들이 실제 새 분관측을 뜻하지 않습니다.

Step one reaches θ* immediately. Half-step gives θₖ=(1−2⁻ᵏ)θ*. These are parameter approximations to means of fixed observations.

43. 두 무차원 기업 좌표Two dimensionless company coordinates

S=100000 백만 USD,δ의 단위도 백만 USD입니다. r₂=δ/(1 백만 USD),q₂=δ/S의 관계와 δ=11007.8988285의 두 좌표를 구하세요.

For S=100000 million USD, relate r₂=δ/(1 million USD) and q₂=δ/S, and evaluate both at δ=11007.8988285 million USD.

풀이와 확인할 이유Solution and explanation

q₂=r₂/100000입니다. 원단위 δ가 11007.8988285 백만 USD이면 r₂=11007.8988285,q₂≈0.110078988285입니다. 둘 다 무차원이지만 같은 숫자 척도는 아닙니다. q₂에 S를 곱해야 원래 δ를 얻습니다.

They satisfy q₂=r₂/100000. The values are 11007.8988285 and about 0.110078988285. Both are dimensionless but differently scaled; restore δ by multiplying q₂ by S.

44. 기업의 작은 기울기 진단A small company gradient diagnostic

기업 r좌표에서 20회 뒤 ‖g‖≈1.89×10⁻⁷,μ≈1.714×10⁻¹¹입니다. 작은 기울기만으로 계수 정확도가 높다고 할 수 있나요?

After 20 r-coordinate steps, ‖g‖≈1.89×10⁻⁷ and μ≈1.714×10⁻¹¹. Does this alone establish accurate coefficients?

풀이와 확인할 이유Solution and explanation

일반 거리 상계 ‖g‖/μ는 약 1.10×10⁴로 매우 큽니다. 실제 단위 복원과 gap을 함께 봐야 합니다. 작은 기울기 숫자가 나쁜 조건수의 평평한 방향을 숨긴 예이며, 최적 계수에 가깝다는 무조건 인증이 아닙니다.

The general distance bound is about 1.10×10⁴, not small. Inspect mapped physical units and objective gap. Tiny curvature can conceal substantial parameter error behind a small gradient.

45. 함수값 인증 양쪽A two-sided objective certificate

μ=1,L=10,‖g‖=0.2인 전체 공간 강볼록·매끄러운 문제의 gap 범위를 구하세요.

For μ=1,L=10 and gradient norm 0.2, bound the objective gap from both sides.

풀이와 확인할 이유Solution and explanation

‖g‖²=0.04이므로 0.04/20≤gap≤0.04/2,즉 0.002≤gap≤0.02입니다. 두 부등식은 서로 다른 곡률 상수를 사용합니다. 이 조건들이 없는 일반 비볼록 문제에 같은 인증을 쓰지 않습니다.

The gap lies between 0.002 and 0.02. The lower bound uses L-smoothness and the upper uses strong convexity; the assumptions are essential.

46. 기하 오차와 로그 직선Geometric versus reciprocal error plots

오차가 Eₖ=5(0.9)ᵏ일 때 log Eₖ와, 오차 Eₖ=5/k일 때 log Eₖ를 비교하세요.

Compare logarithmic formulas for Eₖ=5(0.9)ᵏ and Eₖ=5/k.

풀이와 확인할 이유Solution and explanation

첫째는 log5+klog0.9라 반복 수 k에 대해 직선입니다. 둘째는 log5−logk라 logk에 대해 기울기 −1의 직선입니다. 세로 로그축 하나만으로 두 수렴율을 같은 모양으로 해석하지 않습니다.

The first is linear in k; the second is linear in log k with slope −1. Distinguish semilog and log-log axes before inferring a rate.

47. 볼록율 증명의 마지막 단계The last step of the convex-rate proof

Σⱼ₌₁ᵏ(f(xⱼ)−f*)≤D₀/(2η)이고 함수값이 감소할 때 마지막 gap의 상계를 유도하세요.

If the sum of the first k objective errors is at most D₀/(2η) and values decrease, derive the last error bound.

풀이와 확인할 이유Solution and explanation

각 j≤k에서 f(xⱼ)−f*≥f(xₖ)−f*입니다. 따라서 합≥k(f(xₖ)−f*)이고 양쪽을 k로 나누어 gap≤D₀/(2ηk)입니다. 마지막 점 보장에 단조성이 쓰인 자리입니다.

Every earlier error is at least the last, so the sum is at least k times the last error. Divide by k to get D₀/(2ηk). This is where monotonicity enters.

48. 제약을 어기는 한 단계One infeasible ordinary step

min ½(x+1)² subject to x≥0의 해 0에서 일반 η=0.1 경사하강법을 한 번 적용하세요.

Apply ordinary η=0.1 gradient descent at the optimum zero of min ½(x+1)² subject to x≥0.

풀이와 확인할 이유Solution and explanation

기울기는 1이라 다음 점은 −0.1입니다. 목적함수는 줄 수 있지만 원문제 허용집합을 벗어납니다. 제약 최적점에서 일반 기울기 0을 강요할 수 없고, 제약 알고리즘에는 별도 업데이트가 필요합니다.

The next point is −0.1 and infeasible. Lower objective without feasibility does not solve the constrained problem.

49. Lagrangian 모든 변수 하강의 문제Descending every Lagrangian variable

등식 L=f+λh의 λ까지 같은 경사하강으로 최소화하면 왜 일반 제약 해법이 아닌가요?

Why is minimizing an equality Lagrangian over λ by the same gradient-descent rule not a general constrained solver?

풀이와 확인할 이유Solution and explanation

λ는 제약을 강제하는 자유 승수이고, 허용되지 않는 x에서는 λh를 −∞로 보낼 수 있습니다. 원문제와 쌍대의 최소·최대 구조를 무시한 공동 하강은 KKT의 필요·충분 보장을 갖지 않습니다. 승수 영역과 알고리즘을 따로 설계해야 합니다.

At infeasible x, unrestricted λ can send λh to −∞. Joint descent ignores the primal-dual min/max structure and has no automatic KKT guarantee.

50. 관측 시간과 알고리즘 시간Observation time versus algorithmic time

실제 11년 GDP 자료로 계수를 200회 업데이트했습니다. 200개의 새 GDP 관측을 만든 것인가요?

Fitting 11 years of actual GDP data uses 200 parameter updates. Are these 200 new GDP observations?

풀이와 확인할 이유Solution and explanation

아닙니다. 자료 11개는 고정되어 있고 200개는 그 자료의 손실을 줄이는 계산 계수 상태입니다. 그래프의 반복 수 k를 연도처럼 해석하거나 계수의 진동을 실제 국가 경제의 진동이라고 부르면 안 됩니다.

No. The fixed observations define the loss; updates are computed coefficient states. Iteration counts are not years, and coefficient oscillation is not observed economic oscillation.

51. 최종 보고 문장 고치기Correcting a conclusion

‘100번 돌렸고 거의 안 움직이니 전역 최적’이라는 보고를 정확한 검토 문장으로 고쳐 보세요.

Correct “After 100 iterations it barely moves, therefore it is globally optimal.”

풀이와 확인할 이유Solution and explanation

예: ‘정한 좌표·보폭으로 100회 반복했고 이동량 기준으로 종료했다. 기울기·함수값·허용성을 별도 검사했으며, 전역성은 볼록 구조와 인증 상계가 있는 경우에만 주장한다.’ 반복 예산과 작은 이동은 그 자체로 전역 최적의 증명이 아닙니다.

Report the coordinates, step rule and actual movement-based stopping condition; inspect gradient, value and feasibility separately. Claim global optimality only with justified structure and certificates. A budget and small movement alone do not prove it.

자료와 출처Data and sources

21장 실제 자료와 경사하강법Chapter 21 actual data and gradient descent · 정규화·단위·원자료·정확 반복Normalization, units, source data and exact iterations

자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.

자료사전·출처·이용 조건Data dictionary, sources and terms