凸碗形函数上的梯度下降机制
仅在记录预测与观察证据之后允许求助。
前置要求
完成第 29 天评估;掌握数学模块中的单变量求导(幂法则)。
学习目标
推导梯度下降更新 x ← x − η·2x = x(1 − 2η),并由因子 (1 − 2η) 预测整条优化轨迹。
操作指引
这里的优化指迭代地降低损失。在 f(x) = x² 上梯度为 2x,每步把 x 乘以 (1 − 2η)。从 x₀ = 4、η = 0.1 出发,因子为 0.8:x₁ = 3.2、x₂ = 2.56、x₃ = 2.048,一般地 x_k = 4·0.8^k。先手工推演,再用短 Python 循环确认。注意 η = 0.5 时因子为 0——在这个纯二次函数上一步收敛。
自主演练与记录
对 f(x) = x²、x₀ = 4:(a) 写出 x_k 的闭式;(b) 计算 η = 0.1 时的 x₁、x₂、x₃ 与 x₁₀;(c) 对 f(x) = (a/2)x²,因子为 (1 − ηa)——推导稳定条件 |1 − ηa| < 1 及其蕴含的学习率上界。
x_k = 4·(1−2η)^k;0.8^10 ≈ 0.1074,故 x₁₀ ≈ 0.4295。上界:−1 < 1 − ηa < 1 → 0 < η < 2/a;对 x²,a = 2,故 η < 1。
(a) x_k = 4·(1−2η)^k。(b) η = 0.1:x₁ = 3.2、x₂ = 2.56、x₃ = 2.048、x₁₀ ≈ 0.4295。(c) |1 − ηa| < 1 ⇔ 0 < η < 2/a;对 f = x²(a = 2)上界为 η < 1——而 η = 0.5 恰好一步落到极小值。
闭式推导正确,四个迭代值全部正确,并陈述 η < 2/a 条件及 a = 2 的特例。
权威源资源与权利证明
Dive into Deep Learning (d2l.ai)
对应章节 / 时间戳: Chapter Optimization Algorithms: Gradient Descent
验证版本与日期: Current online edition (Verified: 2026-10-30)
Primary open reference tying evaluation discipline (model selection, underfitting, overfitting) and optimization algorithms (gradient descent, minibatch) to the rest of the curriculum.
Linear algebra, calculus, and probability at the Days 19-28 level.
All required formulas and worked numbers are reproduced as original explanations; the book is further reading.
对比候选资源与选型分析 (2)
Detailed treatment of optimization difficulties (chapter 8) including saddle points and plateaus; all-rights-reserved text kept as a linking-only alternative.
Strong practitioner framing, but organized around the fastai library and video lessons rather than self-contained mathematics.
Gradient Descent, How Neural Networks Learn
对应章节 / 时间戳: Neural networks chapter 2: the gradient and the descent update
验证版本与日期: Neural networks series chapter 2, 2017 (Verified: 2026-10-30)
Visual intuition connecting the gradient vector to steepest descent; complements d2l.ai's worked equations for the optimization day.
High-school functions and slope intuition.
The lesson contains complete derivations and numerical traces; the video is optional visual intuition.
对比候选资源与选型分析 (2)
A detailed optimization text, kept as an advanced alternative; its scope exceeds a single study day.
Rigorous discussion of saddle points and plateaus in high-dimensional optimization; kept as a linking-only alternative.