机器学习
快来分享你的内容吧~
- 01-02 17:31·后端开发梯度下降:机器学习优化算法的理论基础与应用实践 摘要 梯度下降(Gradient Descent)作为机器学习领域最基础且最重要的优化算法,其核心思想是通过迭代更新参数来最小化目标函数。本文系统阐述了梯度下降的数学原理、工作机制及其在各类机器学习算法中的应用。研究表明,梯度下降基于多元函数的方向导数理论,通过负梯度方向实现函数值的最快下降。在算法实现层面,批量梯度下降、随机梯度下降和小批量梯度下降查看全文加油鸭:这篇关于梯度下降的综述文章结构清晰、内容详实,从理论到实践再到前沿进展,展现了深度与广度,非常有助于系统理解这一核心算法。411分享
- 2023-01-05求一份机器学习的路线,最好有每个模块的推荐视频#机器学习#鱼友0412:【超级会员V3】通过百度网盘分享的文件:七月在线-机器学...链接:https://pan.baidu.com/s/1EWDSEX9WjzUVO1x_fccs3Q?pwd=3rew提取码:3rew复制这段内容打开「百度网盘APP 即可获取」1060分享
- 2022-07-20·后端查看全文#人工智能# #机器学习# 分享一下周哥的机器学习方面的笔记有需要自取 完整版看压缩包里面的md文件 然后有想详细了解的朋友可以看下面的人工智能链接文件 ...Cool:好久不见了,我又来分享资料了[呲牙]3070分享
梯度下降:机器学习优化算法的理论基础与应用实践
# 梯度下降:机器学习优化算法的理论基础与应用实践 ## 摘要 梯度下降(Gradient Descent)作为机器学习领域最基础且最重要的优化算法,其核心思想是通过迭代更新参数来最小化目标函数。本文系统阐述了梯度下降的数学原理、工作机制及其在各类机器学习算法中的应用。研究表明,梯度下降基于多元函数的方向导数理论,通过负梯度方向实现函数值的最快下降。在算法实现层面,批量梯度下降、随机梯度下降和小批量梯度下降各具特色,而动量法、Adagrad、Adam 等高级优化器进一步提升了收敛性能。在应用方面,梯度下降在线性回归、神经网络、逻辑回归等算法中发挥着关键作用,特别是在深度学习中与反向传播算法的结合成为模型训练的核心技术。然而,梯度下降也面临学习率敏感性、局部最优陷阱、鞍点停滞等挑战。最新研究在二阶优化、分布式训练、自适应学习率等方向取得了重要进展,为解决这些挑战提供了新的思路。本文的分析为深入理解和应用梯度下降算法提供了全面的理论指导和实践参考。 ## 引言 在机器学习和深度学习蓬勃发展的今天,优化算法扮演着至关重要的角色。其中,梯度下降作为一种一阶迭代优化算法,已成为训练各类机器学习模型的核心技术。从线性回归到深度神经网络,从传统机器学习到现代人工智能,梯度下降无处不在,被称为 "现代机器学习的血液"[(172)](https://blog.csdn.net/AOIWB/article/details/145956165)。 梯度下降的基本思想可以追溯到 19 世纪的数学优化理论。其核心概念是:在多元函数的参数空间中,函数在某一点的梯度方向指向函数值增长最快的方向,因此负梯度方向就是函数值下降最快的方向。基于这一原理,算法通过不断沿着负梯度方向调整参数,逐步逼近函数的最小值点。 然而,尽管梯度下降概念相对简单,但其在实际应用中却展现出丰富的技术内涵。从基础的批量梯度下降到随机梯度下降,从动量法到自适应学习率算法,从单机训练到分布式优化,梯度下降算法家族不断演化,以适应日益复杂的机器学习需求。特别是在深度学习时代,梯度下降与反向传播算法的结合,使得训练具有数百万甚至数十亿参数的神经网络成为可能。 本文旨在为读者提供梯度下降的全面技术解析,包括其数学原理、算法实现、应用场景以及最新发展。我们将从理论基础出发,深入探讨梯度下降的工作机制,然后系统分析其在各类机器学习算法中的具体应用,最后展望该领域的前沿进展。通过本文的学习,读者将能够全面掌握梯度下降的核心技术,并在实际应用中灵活运用。 ## 一、梯度下降的数学原理与理论基础 ### 1.1 导数、偏导数与梯度的数学定义 在深入理解梯度下降之前,我们需要首先建立坚实的数学基础。梯度下降的理论基础源于多元微积分中的导数和梯度概念。对于一个多元函数$f(x_1, x_2, \ldots, x_n)$,其在某一点的变化率可以通过偏导数来描述。偏导数$\frac{\partial f}{\partial x_j}$表示函数$f$在其他变量保持不变的情况下,对变量$x_j$的变化率,其数学定义为: $\frac{\partial f}{\partial x_j} = \lim_{\rho \to 0} \frac{f(x_1, \ldots, x_j + \Delta x_j, \ldots, x_n) - f(x_1, \ldots, x_j, \ldots, x_n)}{\rho}$ 梯度则是由所有偏导数组成的向量,它是多元函数的核心概念。对于函数$f(x, y)$,其梯度定义为: $\nabla f(x, y) = \left[ \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} \right]$ 对于三元函数,梯度定义为: $\nabla f(x, y, z) = \left[ \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}, \frac{\partial f}{\partial z} \right]$ 梯度具有一个重要的几何性质:**梯度向量**** ****垂直于包含点**** ****的等值线**** **。这一性质揭示了梯度方向与函数等值线之间的正交关系,为理解梯度下降的工作原理提供了几何直观。 ### 1.2 方向导数与最速下降方向的理论证明 方向导数是理解梯度下降的关键概念。对于函数$f$在点$\mathbf{x}$沿单位向量$\mathbf{u}$方向的方向导数,定义为: $D_{\mathbf{u}} f(\mathbf{x}) = \nabla f \cdot \mathbf{u}$ 方向导数的另一种等价定义是函数$f$在点$\mathbf{x}$沿方向$\mathbf{u}$的变化率: $D_{\mathbf{u}} f(\mathbf{x}) = \left. \frac{d}{dt} \left( f(\mathbf{x} + t\mathbf{u}) \right) \right|_{t=0}$ 方向导数具有重要的极值性质。根据柯西 - 施瓦茨不等式,对于任意向量$\mathbf{a}$和$\mathbf{b}$,有$|\mathbf{a} \cdot \mathbf{b}| \leq \|\mathbf{a}\| \|\mathbf{b}\|$,当且仅当$\mathbf{a}$和$\mathbf{b}$共线时等号成立。将这一不等式应用于方向导数,我们有: $|D_{\mathbf{u}} f(\mathbf{x})| = |\nabla f \cdot \mathbf{u}| \leq \|\nabla f\| \|\mathbf{u}\| = \|\nabla f\|$ 这表明**方向导数的最大值为**** ****,当且仅当**** ****时取得**。因此,梯度方向是函数值增长最快的方向,而负梯度方向则是函数值下降最快的方向。这一结论为梯度下降算法提供了坚实的理论依据。 ### 1.3 多元函数优化的数学框架 在机器学习中,我们通常需要最小化一个目标函数(损失函数)$J(\theta)$,其中$\theta \in \mathbb{R}^d$是模型的参数向量。梯度下降的目标是找到参数$\theta^*$,使得$J(\theta^*)$达到最小值。 根据优化理论,**如果目标函数**** ****在局部最小值点**** ****处可导,则**** ****是一个驻点,即**** **[(7)](https://arxiv.org/pdf/1911.08058)。对于凸函数,任何驻点都是全局最小值点;而对于非凸函数,驻点可能是局部最小值点或鞍点。 梯度下降算法的基本迭代公式为: $\mathbf{x}(k+1) = \mathbf{x}(k) - \beta(k) \nabla f(\mathbf{x}(k))$ 其中$\beta(k)$是学习率,控制每次更新的步长。这一迭代过程可以看作是常微分方程 $y'(t) = -\nabla f(y(t)), \quad y(0) = y_0 \in \mathbb{R}^d$ 的显式欧拉离散化,步长为$\beta(k)$[(7)](https://arxiv.org/pdf/1911.08058)。这种连续与离散的对应关系为分析梯度下降的收敛性提供了重要工具。 ### 1.4 梯度下降的收敛性理论 梯度下降的收敛性分析是其理论基础的重要组成部分。**梯度下降算法的收敛性证明依赖于三个关键条件**: 1. **目标函数的梯度满足 Lipschitz 连续性**:存在常数$L > 0$,使得对任意的$\mathbf{w}, \mathbf{v}$,有$\|\nabla f(\mathbf{w}) - \nabla f(\mathbf{v})\| \leq L \|\mathbf{w} - \mathbf{v}\|$。 2. **目标函数有下界**:存在常数$m$,使得$f(\mathbf{w}) \geq m$对所有$\mathbf{w}$成立。 3. **学习率满足条件**:学习率$\eta \leq \frac{1}{L}$。 在这些条件下,梯度下降具有以下收敛性质: 对于凸函数,**梯度下降和随机坐标下降都能达到**** ****的全局收敛率**[(31)](https://proceedings.mlr.press/v97/lee19e.html)。而对于强凸函数,收敛速度可以提升到线性收敛。具体而言,设函数$f$是$\alpha$- 强凸且$L$- 光滑的,则梯度下降的收敛率为: $f(\mathbf{x}_k) - f(\mathbf{x}^*) \leq \left(1 - \frac{\alpha}{L}\right)^k (f(\mathbf{x}_0) - f(\mathbf{x}^*))$ 其中$\mathbf{x}^*$是最优解,$\frac{\alpha}{L}$称为条件数。条件数越小,收敛速度越快。 需要注意的是,传统的收敛性分析主要基于学习率小于$2/L$的条件[(23)](https://arxiv.org/html/2402.13108)。然而,实际应用中发现,即使学习率不满足这一条件,梯度下降仍可能收敛,只是表现出 "不稳定收敛" 的特征[(9)](https://arxiv.org/pdf/2204.01050)。这种现象的理论分析是当前研究的热点之一。 ## 二、梯度下降的工作原理与算法实现 ### 2.1 梯度下降的基本工作机制 梯度下降的核心工作原理可以用一个生动的比喻来理解:想象你在一个浓雾笼罩的山丘上,目标是找到最近的山谷(最低点)。由于看不清整个地形,你只能感受到脚下地面的倾斜程度。你的策略是:环顾四周,找到最陡的下坡方向,然后朝着那个方向走一小步。重复这个过程,直到到达一个山谷底部,在这里无论往哪个方向走,地面都是平坦或向上的。 在数学上,梯度下降的工作机制如下: 1. **初始化参数**:选择初始参数$\mathbf{w}_0$,通常设置为随机小值或零。 2. **计算梯度**:在当前参数位置$\mathbf{w}_k$,计算目标函数的梯度$\nabla J(\mathbf{w}_k)$。 3. **更新参数**:沿着负梯度方向更新参数,更新公式为: $\mathbf{w}_{k+1} = \mathbf{w}_k - \eta \nabla J(\mathbf{w}_k)$ 其中$\eta$是学习率,控制步长大小。 4. **检查收敛**:重复步骤 2-3,直到满足收敛条件(如梯度范数小于阈值或损失函数变化小于阈值)。 学习率$\eta$是梯度下降中最重要的超参数。它决定了每次参数更新的步长大小。如果学习率过大,可能导致参数更新越过最优解,甚至发散;如果学习率过小,则收敛速度会非常缓慢。 ### 2.2 梯度下降的三种基本变体 根据每次迭代使用的数据量不同,梯度下降主要分为三种变体,它们在计算效率、收敛速度和内存占用方面各有特点。 \*\* 批量梯度下降(Batch Gradient Descent, BGD)\*\* 每次迭代使用全部训练样本计算梯度: $\mathbf{w}_{k+1} = \mathbf{w}_k - \eta \frac{1}{N} \sum_{i=1}^N \nabla f_i(\mathbf{w}_k)$ 其中$N$是样本总数,$f_i$是第$i$个样本的损失函数。BGD 的特点是: * **优点**:梯度方向稳定,收敛过程平滑;梯度估计精确;易于并行化。 * **缺点**:每次更新需要遍历全部数据,计算和内存开销大;不适合在线学习;训练速度慢。 \*\* 随机梯度下降(Stochastic Gradient Descent, SGD)\*\* 每次迭代只使用一个随机选择的样本计算梯度: $\mathbf{w}_{k+1} = \mathbf{w}_k - \eta \nabla f_{i_k}(\mathbf{w}_k)$ 其中$i_k$是随机选择的样本索引。SGD 的特点是: * **优点**:每次更新计算量小,速度快;内存占用极小;梯度噪声有助于跳出局部最优;适合在线学习和大规模数据。 * **缺点**:收敛曲线抖动大,不稳定;需要仔细调整学习率;可能在最优点附近震荡。 \*\* 小批量梯度下降(Mini-batch Gradient Descent)\*\* 每次使用一个小批量(如 32、64、128 个样本)计算平均梯度: $\mathbf{w}_{k+1} = \mathbf{w}_k - \eta \frac{1}{m} \sum_{j=1}^m \nabla f_{i_j}(\mathbf{w}_k)$ 其中$m$是批量大小。小批量梯度下降的特点是: * **优点**:兼顾了批量和随机的优点,既高效又稳定;支持 GPU 并行加速;收敛更平滑;是深度学习训练的主流方法。 * **缺点**:需要选择合适的批量大小;对批量大小敏感。 三种方法的性能对比总结如下表: | 方法 | 梯度估计 | 更新频率 | 内存消耗 | 收敛速度 | 噪声水平 | 适用场景 | | ---------- | -------- | -------- | -------- | ---------------- | -------- | ---------------- | | BGD | 精确 | 慢 | 高 | 慢 | 低 | 小数据、离线训练 | | SGD | 粗糙 | 快 | 低 | 快但需更多轮次 | 高 | 大数据、在线学习 | | Mini-batch | 适中 | 适中 | 适中 | 最快(并行加速) | 适中 | 深度学习主流 | 从上表可以看出,小批量梯度下降在实际应用中表现最优,特别是在结合 GPU 并行计算的情况下,能够实现最快的收敛速度[(158)](https://blog.csdn.net/xyzroundo/article/details/150446688)。 ### 2.3 动量法(Momentum) 动量法是梯度下降的重要改进算法,其核心思想是引入 "动量" 概念来加速收敛并减少震荡。**动量法的主要思想是计算梯度的指数加权平均并用于更新权重**[(57)](https://optimization.cbe.cornell.edu/index.php?title=Momentum)。 动量法的算法流程如下: 1. **初始化速度变量**:$v_0 = 0$ 2. **迭代更新**: $ v_t &= \gamma v_{t-1} + \eta \nabla J(\theta_t) \\ \theta &= \theta - v_t \end{align*}$$ $ 其中$\gamma$是动量参数,通常设置为 0.9 或类似值。 动量法的直观理解是:**当使用动量时,我们就像在向下推一个球。动量项会增加梯度方向相同的维度的更新,并减少梯度方向变化的维度的更新**。具体而言: * **当梯度方向一致时**,动量会加速参数更新,提高收敛速度。 * **当梯度方向改变时**,动量会降低参数更新速度,减少震荡。 这种机制使得动量法在处理具有狭长山谷形状的损失函数时特别有效,能够减少 "之字形" 的更新路径。 ### 2.4 Nesterov 加速梯度(NAG) Nesterov 加速梯度(Nesterov Accelerated Gradient, NAG)是动量法的进一步改进。**NAG 的核心思想是给动量项一种 "预见性"**。 NAG 的算法流程与标准动量法有所不同: 1. **预测下一步位置**:$\theta' = \theta - \gamma v_{t-1}$ 2. **在预测位置计算梯度**:$\nabla f(\theta')$ 3. **更新速度和参数**: $ v_t &= \gamma v_{t-1} + \eta \nabla f(\theta') \\ \theta &= \theta - v_t \end{align*}$$ $ NAG 与标准动量法的区别在于梯度计算的时机。**标准动量法先计算当前梯度,然后沿更新后的累积梯度方向大跳;NAG 则先沿先前累积梯度方向大跳,测量梯度,然后进行修正**。这种预看(look-ahead)机制使得算法能够更准确地调整方向,提高收敛速度。 ### 2.5 自适应学习率算法 自适应学习率算法能够根据参数的历史梯度信息动态调整学习率,从而提高收敛速度和稳定性。 **Adagrad**是最早的自适应学习率算法之一。它的核心思想是:**为每个参数分配不同的学习率,对频繁出现的参数使用较小的学习率,对稀疏参数使用较大的学习率**。Adagrad 的更新规则为: $\theta_{t+1,i} = \theta_{t,i} - \frac{\eta}{\sqrt{G_{t,ii} + \epsilon}} \cdot g_{t,i}$ 其中$G_t$是累积梯度平方矩阵,$\epsilon$是平滑项防止除零。 然而,Adagrad 有一个严重的缺陷:**学习率会单调递减并最终变得极小,导致算法无法继续学习**。 **RMSprop**是对 Adagrad 的改进,通过引入衰减因子来解决学习率过快减小的问题。RMSprop 使用指数加权平均来计算梯度平方的累积: $E[g^2]_t = \gamma E[g^2]_{t-1} + (1-\gamma)g_t^2$ 然后使用类似 Adagrad 的方式更新参数: $\theta_{t+1} = \theta_t - \frac{\eta}{\sqrt{E[g^2]_t + \epsilon}} g_t$ 其中$\gamma$通常设置为 0.9。 **Adam**(Adaptive Moment Estimation)结合了动量法和 RMSprop 的优点,是目前最流行的优化器之一。Adam 的创新在于: 1. **计算梯度的一阶矩估计(动量)**:$m_t = \beta_1 m_{t-1} + (1-\beta_1)g_t$ 2. **计算梯度的二阶矩估计(RMSprop)**:$v_t = \beta_2 v_{t-1} + (1-\beta_2)g_t^2$ 3. **偏差修正**:由于初始时矩估计偏向于 0,需要进行偏差修正: $\hat{m}_t = \frac{m_t}{1 - \beta_1^t}, \quad \hat{v}_t = \frac{v_t}{1 - \beta_2^t}$ 4. **参数更新**: $\theta_{t+1} = \theta_t - \frac{\eta}{\sqrt{\hat{v}_t} + \epsilon} \hat{m}_t$ Adam 的默认参数为:$\beta_1 = 0.9$,$\beta_2 = 0.999$,$\epsilon = 10^{-8}$。 ### 2.6 高级优化器的性能对比 通过对 Matyas 函数和 Levi 函数的实验对比,不同优化器的性能表现如下: 在 Matyas 函数(简单二次函数)上的结果: | 方法 | 执行时间 (s) | 发现的最小值 | 全局最小值 | 误差 | 迭代次数 | | --------- | ------------ | --------------------------------- | ---------- | ------------ | -------- | | GD | 0.147106 | \[-1.68e+00, -1.68e+00, 1.12e-01] | \[0, 0, 0] | -0.1123305 | 10001 | | MGD | 0.082393 | \[-1.41e+00, -1.41e+00, 7.97e-02] | \[0, 0, 0] | -0.0797257 | 10001 | | AGD(Adam) | 0.023986 | \[-7.04e-04, -7.03e-04, 1.98e-08] | \[0, 0, 0] | -1.97847e-08 | 903 | | GD\_LR | 0.052210 | \[-7.50e-01, -7.50e-01, 2.25e-02] | \[0, 0, 0] | -0.022515088 | 10001 | 实验结果显示,**Adam 表现出最有效的收敛,达到全局最小值时误差仅为 - 1.98e-08**,突出了其在简单地形中的优越适应性。 在更复杂的 Levi 函数(具有多个局部最小值)上,所有算法都面临挑战,但 Adam 仍然相对表现较好。这表明,虽然 Adam 在简单任务上表现优异,但在处理具有复杂地形和多个局部最小值的函数时,可能需要更先进的技术。 ## 三、梯度下降在机器学习算法中的应用 ### 3.1 线性回归中的梯度下降 线性回归是梯度下降最早也是最经典的应用场景之一。在线性回归中,我们试图找到最优的参数向量$\mathbf{w}$和偏置$b$,使得模型能够最佳拟合训练数据。 **线性回归模型**可以表示为: $\hat{y} = \mathbf{w}^T \mathbf{x} + b$ 其中$\mathbf{x}$是输入特征向量,$\hat{y}$是预测值。 **损失函数**通常采用均方误差(MSE): $J(\mathbf{w}, b) = \frac{1}{m} \sum_{i=1}^m (y^{(i)} - \hat{y}^{(i)})^2$ 其中$m$是样本数量,$y^{(i)}$是第$i$个样本的真实值。 梯度下降的目标是最小化这个损失函数。通过计算梯度,我们可以得到参数更新规则。以单变量线性回归为例,梯度计算过程如下: 1. **权重的梯度**: $\frac{\partial J}{\partial w} = \frac{2}{m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)}) \cdot x^{(i)}$ 2. **偏置的梯度**: $\frac{\partial J}{\partial b} = \frac{2}{m} \sum_{i=1}^m (h_\theta(x^{(i)}) - y^{(i)})$ 其中$h_\theta(x^{(i)})$是模型的预测值。 梯度下降的参数更新过程具有以下特点: * **初始化**:权重和偏置通常初始化为接近零的随机值 * **迭代更新**:重复执行 "计算损失→计算梯度→更新参数" 的过程 * **收敛判断**:当损失函数不再显著下降或达到最大迭代次数时停止 值得注意的是,**线性模型的损失函数始终是凸函数**,因此梯度下降能够保证找到全局最优解。这与神经网络等复杂模型形成鲜明对比,后者的损失函数通常是非凸的,可能存在多个局部最优解。 ### 3.2 神经网络中的反向传播与梯度下降 在神经网络中,梯度下降与反向传播算法的结合是模型训练的核心技术。**反向传播是训练神经网络的主要算法,使多层网络的梯度下降成为可能**[(114)](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation)。 #### 反向传播的基本原理 反向传播的核心是利用微积分的链式法则,从神经网络的输出层开始,逆向逐层传播误差信号,计算每个参数的梯度。具体流程如下: 1. **前向传播**:输入数据通过网络计算得到预测输出,同时保存各层的中间结果。 2. **计算输出层误差**:在输出层,可以直接计算损失函数对输出的误差。 3. **反向传播误差**:利用链式法则,误差信号从输出层逐层向前传播,计算每一层的误差项。 4. **计算梯度**:根据误差项计算每个权重和偏置的梯度。 5. **参数更新**:使用梯度下降更新所有参数。 以一个简单的神经元为例,反向传播的计算过程展示了链式法则的应用: 设神经元的输入为$x$,权重为$w$,偏置为$b$,激活函数为$f$,输出为$\hat{y} = f(wx + b)$。损失函数为$L = \frac{1}{2}(y - \hat{y})^2$。 前向传播: $z = wx + b \rightarrow \hat{y} = f(z) \rightarrow L = \frac{1}{2}(y - \hat{y})^2$ 反向传播(应用链式法则): $\frac{\partial L}{\partial \hat{y}} = -(y - \hat{y})$ $\frac{\partial \hat{y}}{\partial z} = f'(z)$ $\frac{\partial L}{\partial z} = \frac{\partial L}{\partial \hat{y}} \cdot \frac{\partial \hat{y}}{\partial z} = -(y - \hat{y}) \cdot f'(z)$ $\frac{\partial z}{\partial w} = x$ $\frac{\partial L}{\partial w} = \frac{\partial L}{\partial z} \cdot \frac{\partial z}{\partial w} = [-(y - \hat{y}) \cdot f'(z)] \cdot x$ 在深度网络中,反向传播将这个链式求导过程从输出层一直应用到输入层,高效地计算出损失函数相对于网络中每个参数的梯度。 #### 梯度消失与爆炸问题 在深度神经网络训练中,梯度下降面临两个主要挑战:梯度消失和梯度爆炸。 **梯度消失问题**是指在反向传播过程中,梯度通过多层网络逐层传递时,其值逐渐减小,最终接近零。主要原因包括: 1. **激活函数的选择**:Sigmoid 和 Tanh 函数在输入值较大或较小时会进入饱和区,导数接近零。Sigmoid 的导数最大值仅为 0.25,多层传递后梯度会指数级衰减。 2. **链式法则的累积效应**:反向传播中,梯度是各层导数的乘积。若每层导数均小于 1,多层后梯度趋近于零。 3. **网络深度的影响**:深层网络中,梯度需经过更多层的导数相乘,衰减效应更明显。例如,一个 10 层的 Sigmoid 网络,梯度可能衰减至初始值的$(0.25^{10} \approx 9.5 \times 10^{-7})$。 **梯度爆炸问题**是指梯度在反向传播过程中逐渐增大,最终导致数值溢出(如 NaN)。主要原因包括: 1. **激活函数的选择**:ReLU 及其变体在正区间导数为 1,但若权重初始化不当或学习率过高,梯度可能逐层放大。 2. **权重初始化不当**:初始权重过大时,前向传播的激活值可能爆炸,反向传播的梯度也随之爆炸。 3. **长序列依赖**:在 RNN/LSTM 中,若序列很长,梯度通过时间步反向传播时可能累积放大。 #### 解决方案 针对梯度消失和爆炸问题,研究者提出了多种解决方案: **激活函数的改进**: * **ReLU 及其变体**:ReLU 在正区间导数为 1,避免了梯度衰减,但可能存在 "神经元死亡" 问题。Leaky ReLU 和 Parametric ReLU 在负区间引入小斜率(如 0.01),缓解了这一问题。 * **Swish 和 GELU**:平滑的非线性函数,兼顾表达能力和梯度流动。 **网络结构的改进**: * **残差连接(Residual Connections)**:如 ResNet 中的跳跃连接,直接传递梯度到浅层,避免多层导数相乘。公式为:$H(x) = F(x) + x$,其中$F(x)$为残差块。 * **批归一化(Batch Normalization)**:对每层输入进行标准化,使激活值分布稳定,减少对初始权重的敏感性,缓解梯度消失。 **训练技术的改进**: * **权重初始化优化**:使用 Xavier/Glorot 初始化(根据输入输出维度调整初始权重范围)或 He 初始化(针对 ReLU),避免初始梯度过小或过大。 * **梯度裁剪(Gradient Clipping)**:设定梯度阈值,若梯度超过阈值则按比例缩放,防止梯度爆炸。 ### 3.3 逻辑回归中的梯度下降 逻辑回归是处理分类问题的经典算法,其损失函数与线性回归有本质区别。**逻辑回归使用对数损失函数(log loss)而非平方损失函数**。 **对数损失函数**(也称为交叉熵损失)定义为: $J = \sum_{(x,y) \in D} -y \log(y') - (1-y) \log(1-y')$ 其中$D$是数据集,$y$是真实标签(0 或 1),$y'$是模型的预测概率(介于 0 和 1 之间)。 使用对数损失而非平方损失的原因在于逻辑回归模型的非线性特性。Sigmoid 函数的输出在接近 0 和 1 时变化率很小,使用平方损失会导致梯度计算困难,需要更多内存来保持精度。 逻辑回归的训练过程与线性回归类似,都是通过梯度下降迭代优化参数,但有以下重要区别: 1. **输出层使用 Sigmoid 激活函数**,将线性输出转换为概率值。 2. **损失函数使用对数损失**,更好地反映分类问题的本质。 3. **梯度计算更复杂**,需要考虑 Sigmoid 函数的导数。 逻辑回归的梯度计算涉及对 Sigmoid 函数的求导,这在反向传播中会增加一定的计算复杂度,但整体的优化框架与线性回归保持一致。 ### 3.4 支持向量机(SVM)中的梯度下降 支持向量机(SVM)的优化问题也可以通过梯度下降来解决,尽管 SVM 通常使用专门的优化算法(如 SMO)。 **SVM 的优化目标**可以表述为最小化结构化风险: $f(\mathbf{w}, b) = \frac{1}{n} \sum_{i=1}^n \max(0, 1 - y_i(\mathbf{w}^T \mathbf{x}_i - b)) + \lambda \|\mathbf{w}\|^2$ 其中第一项是 hinge 损失,第二项是 L2 正则化项。 一些 SVM 实现直接使用梯度下降方法。例如,**Oracle 的 SVM 实现包括两种求解器:内点法(IPM)求解器和子梯度下降(SGD)求解器**[(100)](http://docs.oracle.com/en/database/oracle/machine-learning/oml4sql/21/dmcon/support-vector-machine.html)。 **Pegasos 算法**(Primal Estimated sub-GrAdient SOlver for SVM)是一个使用随机梯度下降求解 SVM 的有效算法。该算法在随机梯度下降步骤和投影步骤之间交替进行[(99)](http://ttic.uchicago.edu/~shai/papers/ShalevSiSr07.pdf),能够处理大规模数据。 梯度下降在 SVM 中的应用面临一些挑战: 1. **非光滑损失函数**:hinge 损失在某些点不可导,需要使用次梯度(subgradient)方法。 2. **约束优化问题**:SVM 本质上是一个约束优化问题,需要特殊的处理方法。 3. **核函数的应用**:当使用核函数时,计算复杂度会显著增加。 尽管存在这些挑战,梯度下降方法在处理大规模 SVM 问题时仍具有优势,特别是在结合随机优化和在线学习的场景中。 ### 3.5 深度学习中的梯度下降 在深度学习时代,梯度下降的应用达到了前所未有的规模和复杂度。现代深度学习模型可能包含数十亿个参数,训练过程需要处理海量数据,这对梯度下降算法提出了严峻挑战。 #### 计算复杂度分析 深度学习模型的梯度计算复杂度极高。以 Transformer 架构为例,**其参数梯度计算复杂度达到**** **(其中$L$为序列长度,$d$为隐层维度)。当$d$突破万级时,单次反向传播的计算开销已接近 GPU 集群的算力边界[(165)](https://cloud.tencent.com.cn/developer/article/2490894?frompage=seopage\&policyId=20240000\&traceId=01k0st4t3hdxtaq19b8p8123jy)。 这种计算复杂度带来的挑战包括: 1. **内存需求巨大**:反向传播时需要存储大量中间变量,容易导致内存溢出。 2. **计算时间长**:即使是简单的梯度下降算法,在处理大规模数据时也会变得很慢。每次迭代的计算成本与样本数量$n$成正比[(166)](https://damek.github.io/STAT-4830/section/6/notes.html)。 3. **通信开销**:在分布式训练中,梯度同步需要大量的通信开销。 #### 优化策略 为应对这些挑战,研究者提出了多种优化策略: **混合精度训练**是一项重要技术。通过使用 FP16 半精度数据类型,可以: * 节省 50% 的内存占用 * 提升 3 倍的计算速度(在 Ampere GPU 上相对于 TF32) * 保持与单精度相当的模型精度 混合精度训练的实现需要两个关键步骤: 1. 将模型转换为使用半精度数据类型 2. 使用损失缩放(loss scaling)来保持小梯度值的精度[(145)](https://developer.nvidia.com/automatic-mixed-precision/) 在 PyTorch 中,混合精度训练的典型实现如下[(148)](https://glaringlee.github.io/notes/amp_examples.html): ``` scaler = GradScaler() for input, target in data:   optimizer.zero\_grad()   with autocast():   output = model(input)   loss = loss\_fn(output, target)   scaler.scale(loss).backward()   scaler.step(optimizer)   scaler.update() ``` **梯度裁剪**是防止梯度爆炸的有效方法。在 DeepSpeed 等框架中,梯度裁剪在底层自动处理,用户只需指定最大梯度范数即可[(149)](https://www.deepspeed.ai/training/)。 #### 分布式训练 随着模型规模的增大,单机训练已无法满足需求,分布式训练成为必然选择。\*\* 梯度协同(Gradient Descent Distributed, GDD)\*\* 是一种分布式优化算法,其核心思想是将梯度下降过程分解为多个子任务,每个子任务负责计算部分梯度,然后通过协同计算全局梯度。 分布式梯度下降的基本流程: 1. **初始化**:在所有计算节点上初始化相同的模型参数。 2. **数据划分**:将数据集划分为多个部分,每个节点处理一部分。 3. **本地计算**:每个节点使用本地数据计算部分梯度。 4. **梯度聚合**:将所有部分梯度汇总为全局梯度。 5. **参数更新**:使用全局梯度更新模型参数。 6. **同步参数**:将更新后的参数广播到所有节点。 这种分布式策略可以有效利用多核 CPU、GPU 和多机集群资源,提高训练速度和效率。然而,分布式训练也带来了新的挑战,如通信开销、梯度同步、负载均衡等问题。 ### 3.6 其他机器学习算法中的梯度下降 除了上述算法外,梯度下降还广泛应用于其他机器学习场景: **集成学习**:在梯度提升树(Gradient Boosting Tree)中,新的树通过拟合前一棵树的残差来提升性能,这本质上是在函数空间中进行梯度下降。 **强化学习**:在策略梯度方法中,通过最大化累积奖励的期望来更新策略网络的参数,使用梯度上升(与梯度下降类似)来优化目标函数。 **自编码器和生成模型**:如变分自编码器(VAE)、生成对抗网络(GAN)等,都使用梯度下降来优化相应的损失函数。 **推荐系统**:在矩阵分解、深度学习推荐模型等方法中,梯度下降被用于优化模型参数以最小化预测误差。 ## 四、梯度下降的高级话题与最新进展 ### 4.1 二阶优化方法的理论与实践 虽然梯度下降是一阶方法,但理解二阶优化方法对于全面认识梯度下降的优缺点很重要。**牛顿法是二阶收敛,而梯度下降是一阶收敛,因此牛顿法通常收敛更快**[(103)](https://blog.csdn.net/zgcr654321/article/details/89674713)。 **牛顿法的基本思想**是在当前点使用二次函数近似目标函数,然后通过求解二次函数的最小值来确定下一步的位置。牛顿法的更新规则为: $\mathbf{x}_{k+1} = \mathbf{x}_k - H^{-1} \nabla f(\mathbf{x}_k)$ 其中$H$是 Hessian 矩阵,包含目标函数的二阶导数。 从几何角度看,**牛顿法使用二次曲面对当前位置的局部曲面进行拟合,而梯度下降法使用平面进行拟合。通常情况下,二次曲面的拟合会比平面更好,因此牛顿法选择的下降路径更符合真实的最优下降路径**[(107)](https://blog.csdn.net/qq_31375855/article/details/85060342)。 然而,牛顿法在实际应用中面临严重挑战: 1. **计算复杂度高**:Hessian 矩阵的计算复杂度为$O(n^3)$,其中$n$是参数数量。 2. **存储需求大**:Hessian 矩阵需要$O(n^2)$的存储空间。 3. **数值稳定性问题**:Hessian 矩阵可能不是正定的,导致方法失效。 4. **局部性问题**:牛顿法是局部方法,对初始点敏感。 **拟牛顿法**通过使用 Hessian 矩阵的近似来克服这些问题。拟牛顿法通常具有超线性收敛速度,虽然不如牛顿法的二次收敛快,但比梯度下降的线性收敛要快[(109)](https://algotradinglib.com/en/pedia/q/quasi-newton_methods.html)。常见的拟牛顿法包括 BFGS、L-BFGS 等。 ### 4.2 梯度下降的最新理论突破 近年来,梯度下降理论研究取得了重要突破,特别是在理解其收敛性质和局限性方面。 **不稳定收敛现象的理论分析**是一个重要进展。传统的梯度下降收敛性分析主要基于学习率小于$2/L$的条件,但许多研究发现,在机器学习应用中学习率往往不满足这一条件,但梯度下降仍能收敛,尽管表现出 "不稳定收敛" 的特征[(9)](https://arxiv.org/pdf/2204.01050)。 研究者从第一原理出发,深入探讨了这种不稳定收敛现象的关键原因,并基于理论和实验识别了其主要特征及相互关系,为理解这一现象提供了有原则的视角。 **梯度下降的计算复杂度下界**是另一个重要发现。最新研究表明,**梯度下降本质上在解决一个计算困难的问题,这为该技术在特定应用中的性能设定了理论极限**[(170)](https://www.quantamagazine.org/computer-scientists-discover-limits-of-major-research-algorithm-20210817)。这一结果揭示了梯度下降的内在局限性,对未来算法设计具有重要指导意义。 **自适应梯度方法的理论分析**也取得了进展。研究发现,与标准 SGD 相比,自适应方法能够更快地逃离鞍点,并且总体上能够更快地收敛到二阶平稳点[(72)](https://www.arxiv-vanity.com/papers/1901.09149/)。这一发现为 Adam 等自适应优化器的广泛应用提供了理论支撑。 ### 4.3 梯度下降的改进方向 基于对梯度下降局限性的认识,研究者提出了多个改进方向: **学习率和批量大小的协同优化**是一个活跃的研究方向。最新研究表明,**最优学习率随批量大小的增长呈现先增后减的 "激增现象",激增的峰值代表了训练速度和数据效率之间的权衡点**[(141)](https://www.arxiv.org/pdf/2405.14578)。 Seesaw 算法提出了一种新的调度策略:每当标准调度器将学习率减半时,Seesaw 将学习率乘以$1/\sqrt{2}$并将批量大小加倍,在保持损失动态的同时减少串行步骤[(139)](https://web3.arxiv.org/pdf/2510.14717)。 **分布式和异步优化**是另一个重要方向。去中心化马尔可夫链梯度下降(DMGD)算法是去中心化随机梯度方法的一个变体,其中随机样本是沿着马尔可夫链的轨迹获取的[(128)](https://openreview.net/forum?id=UEk8tXZ8FHS)。这种方法在处理分布式优化问题时具有独特优势。 **量子计算与梯度下降的结合**代表了未来的一个可能方向。量子计算可能为大模型训练中的梯度下降提供新的加速方式,特别是在处理高维优化问题时可能展现出独特优势。 ### 4.4 工程实践中的优化策略 在实际工程应用中,为了充分发挥梯度下降的性能,需要采用多种优化策略: **学习率调度**是最重要的策略之一。常见的调度方法包括: * **指数衰减**:学习率随时间指数下降 * **余弦退火**:学习率按照余弦函数周期性变化 * **自适应调度**:根据验证集性能动态调整学习率 **批量大小的选择**也至关重要。研究表明,**批量大小和学习率需要协同考虑,批量大小增加时通常需要提高学习率**[(137)](https://www.cnblogs.com/guxuanqing/p/19217011)。线性缩放规则建议:若新批量大小是原批量大小的$k$倍,则新学习率 = 原学习率 × $k$(适用于 SGD)[(138)](https://github.com/luweiagi/machine-learning-notes/blob/master/docs/deep-learning/tips/learning-rate/learning-rate-and-batch-size/learning-rate-and-batch-size.md)。 **梯度检查和调试**是确保训练正确进行的重要手段。通过数值梯度和解析梯度的对比,可以验证反向传播实现的正确性。 **混合精度训练**已成为现代深度学习训练的标配。通过使用半精度计算,可以在保持精度的同时显著提升训练速度和减少内存占用。 ## 五、梯度下降的优缺点评估与适用场景 ### 5.1 梯度下降的主要优势 梯度下降作为机器学习的核心算法,具有以下显著优势: **简单高效**:梯度下降易于实现,计算效率高,特别适合大规模数据集。它通过增量式的梯度更新来调整参数,避免了一次性处理所有数据的计算负担。 **可扩展性强**:梯度下降能够很好地处理高维数据和大规模问题,特别是与随机或小批量变体结合时。它可以轻松扩展到包含数百万甚至数十亿参数的深度学习模型。 **灵活性高**:通过调整损失函数和学习率,梯度下降可以应用于各种机器学习模型,包括线性回归、逻辑回归、神经网络等。这种通用性使其成为机器学习工具箱中的核心组件。 **支持在线学习**:随机梯度下降能够逐个处理样本,非常适合实时应用场景,如欺诈检测系统需要动态适应新交易模式。 **理论基础扎实**:梯度下降具有完善的收敛性理论,特别是在凸优化问题上能够保证找到全局最优解。这为算法的可靠性提供了理论保证。 ### 5.2 梯度下降面临的挑战 尽管梯度下降应用广泛,但仍面临多重挑战: **学习率敏感性**是最突出的问题。学习率选择不当会导致收敛缓慢(过小)或发散(过大)。这种敏感性在深度学习模型训练中尤为明显,不当的学习率可能导致损失函数震荡或无法下降。 **局部最优和鞍点问题**在非凸优化中普遍存在。神经网络等复杂模型的优化问题可能使算法陷入次优解。特别是在高维非凸函数中,梯度下降容易陷入局部最优陷阱或在鞍点处停滞[(172)](https://blog.csdn.net/AOIWB/article/details/145956165)。 **计算需求高**:对于非可微损失函数或难以计算梯度的模型,梯度下降不适用。此外,计算梯度本身也需要额外的计算开销。 **对初始化的依赖**:糟糕的参数初始化可能导致收敛缓慢或陷入不良的局部最小值。这要求使用者对问题有一定的先验知识或进行大量的实验来找到合适的初始化策略。 **鞍点停滞问题**:在高维优化问题中,鞍点比局部最小值更常见。在鞍点处,梯度为零,但该点并非极值点。传统的梯度下降在鞍点处会停滞不前。 ### 5.3 梯度下降的适用场景 基于梯度下降的特点,我们可以总结出其适用场景: **适用场景**: 1. **大规模数据**:特别是当数据量超过内存容量时,随机梯度下降和小批量梯度下降能够有效处理。 2. **在线学习**:需要实时处理数据流的场景,如推荐系统、欺诈检测等。 3. **深度学习**:神经网络训练几乎离不开梯度下降及其变体,特别是在处理图像、语音、文本等复杂数据时。 4. **凸优化问题**:在线性回归、逻辑回归等凸问题中,梯度下降能够保证找到全局最优解。 5. **分布式训练**:梯度下降的并行化特性使其适合在多 GPU、多节点环境下进行大规模模型训练。 **不适用场景**: 1. **非可微函数**:如果目标函数在某些点不可导(如包含绝对值、阶跃函数等),需要使用其他方法。 2. **强约束优化**:当存在复杂的不等式或等式约束时,需要使用专门的约束优化方法。 3. **内存受限环境**:批量梯度下降需要存储所有数据,不适合内存严重受限的设备。 4. **需要快速收敛**:在某些实时应用中,梯度下降的迭代特性可能无法满足时间要求。 ### 5.4 梯度下降的未来展望 展望未来,梯度下降将在以下几个方向继续发展: **算法改进**:随着对梯度下降理论理解的深入,新的算法变体将不断涌现。特别是在自适应学习率、动量机制、二阶信息利用等方面,有望出现突破性进展。 **硬件加速**:随着专用 AI 芯片(如 TPU、NPU)的发展,梯度下降的实现将更加高效。这些硬件专门针对矩阵运算和梯度计算进行优化,将显著提升训练速度。 **理论突破**:对非凸优化、高维优化、随机优化等理论的深入研究,将为梯度下降提供更强的理论支撑和改进方向。 **应用拓展**:随着机器学习应用领域的不断扩展,梯度下降将在更多场景中发挥作用,如量子机器学习、脑机接口、自动驾驶等前沿领域。 ## 结论 本文对梯度下降算法进行了全面深入的分析,从数学原理到工程实践,从经典应用到最新进展,系统阐述了这一机器学习核心算法的全貌。 在理论层面,我们深入探讨了梯度下降的数学基础,包括导数、梯度、方向导数等概念,以及负梯度方向作为函数下降最快方向的理论证明。梯度下降的收敛性理论为其在机器学习中的应用提供了坚实的理论保障。 在算法实现层面,我们详细分析了批量梯度下降、随机梯度下降和小批量梯度下降的特点和适用场景,以及动量法、Nesterov 加速梯度、Adagrad、RMSprop、Adam 等高级优化器的原理和优势。这些算法变体的不断演进,使得梯度下降能够适应越来越复杂的优化需求。 在应用实践层面,我们系统梳理了梯度下降在各类机器学习算法中的应用,包括线性回归、神经网络、逻辑回归、支持向量机等。特别是在深度学习时代,梯度下降与反向传播的结合成为模型训练的核心技术,推动了人工智能的飞速发展。 然而,我们也清醒地认识到梯度下降面临的挑战,包括学习率敏感性、局部最优陷阱、鞍点停滞、计算复杂度高等问题。针对这些挑战,研究者在理论分析和算法改进方面取得了重要进展,如对不稳定收敛现象的深入理解、自适应优化方法的理论突破等。 展望未来,随着机器学习应用的不断深入和硬件技术的持续进步,梯度下降将在更多领域发挥关键作用。同时,新的理论突破和算法创新将进一步提升其性能,使其能够应对更加复杂的优化挑战。对于研究者和工程师而言,深入理解梯度下降的原理和实践,掌握其各种变体的特点和适用场景,将是在机器学习领域取得成功的关键。 梯度下降不仅是一个算法,更是机器学习思想的集中体现 —— 通过迭代优化逐步逼近最优解。这种思想将继续指导我们在人工智能的道路上不断前进。 **参考资料 ** \[1] An overview of gradient descent optimization algorithms\*[ https://web2.qatar.cmu.edu/\~gdicaro/15281/additional/survey-gradient-descent-algorithms.pdf](https://web2.qatar.cmu.edu/~gdicaro/15281/additional/survey-gradient-descent-algorithms.pdf) \[2] From Optimization to Sampling Through Gradient Flows[ https://www.ams.org/journals/notices/202306/rnoti-p905.pdf?adat=June/July%202023\&trk=2717\&cat=feature\&galt=none](https://www.ams.org/journals/notices/202306/rnoti-p905.pdf?adat=June/July%202023\&trk=2717\&cat=feature\&galt=none) \[3] CS168: The Modern Algorithmic Toolbox Lecture #6: Stochastic Gradient Descent and Regularization[ http://courses.cs.washington.edu/courses/cse446/22au/schedule/SGD.pdf](http://courses.cs.washington.edu/courses/cse446/22au/schedule/SGD.pdf) \[4] Gradient Descent Learning Algorithm Overview: A General Dynamical Systems Perspective[ https://www.igb.uci.edu/\~pfbaldi/publications/journals/1995/00363438.pdf\_isNumber=8331\&prod=JNL\&arnumber=363438\&arSt=182\&ared=195\&arAuthor=Baldi%252C+P.pdf](https://www.igb.uci.edu/~pfbaldi/publications/journals/1995/00363438.pdf_isNumber=8331\&prod=JNL\&arnumber=363438\&arSt=182\&ared=195\&arAuthor=Baldi%252C+P.pdf) \[5] FIRST-ORDER AND SECOND-ORDER VARIANTS OF THE GRADIENT DESCENT: A UNIFIED FRAMEWORK[ https://arxiv.org/pdf/1810.08102](https://arxiv.org/pdf/1810.08102) \[6] A Gentle Introduction to Gradient-Based Optimization and Variational Inequalities for Machine Learning[ https://arxiv.org/pdf/2309.04877](https://arxiv.org/pdf/2309.04877) \[7] The Gradient descent method from the perspective of fractional calculus[ https://arxiv.org/pdf/1911.08058](https://arxiv.org/pdf/1911.08058) \[8] 理解共轭梯度法[ https://www.hliangzhao.cn/materials/CG.pdf](https://www.hliangzhao.cn/materials/CG.pdf) \[9] Understanding the “Unstable Convergence” of Gradient Descent[ https://arxiv.org/pdf/2204.01050](https://arxiv.org/pdf/2204.01050) \[10] 从零开始理解并推导梯度下降法\_51CTO博客\_梯度下降法推导过程[ https://blog.51cto.com/u\_14819979/14219584](https://blog.51cto.com/u_14819979/14219584) \[11] Gradient Descent[ https://courses.cs.washington.edu/courses/cse446/24wi/schedule/lecture\_07/gradient\_descent\_annotated.pdf](https://courses.cs.washington.edu/courses/cse446/24wi/schedule/lecture_07/gradient_descent_annotated.pdf) \[12] Lecture 13: Gradient Descent f(pdf)[ https://courses.cs.washington.edu/courses/cse446/22wi/schedule/week5L13\_annotated.pdf](https://courses.cs.washington.edu/courses/cse446/22wi/schedule/week5L13_annotated.pdf) \[13] Gradient descent - Wikipedia[ https://static.hlt.bme.hu/semantics/external/pages/backprop/en.wikipedia.org/wiki/Gradient\_descent.html](https://static.hlt.bme.hu/semantics/external/pages/backprop/en.wikipedia.org/wiki/Gradient_descent.html) \[14] \[AI趋势探讨]深度学习的数学本质:梯度下降与损失函数深度剖析-腾讯云开发者社区-腾讯云[ https://cloud.tencent.cn/developer/article/2504502?policyId=1003](https://cloud.tencent.cn/developer/article/2504502?policyId=1003) \[15] Gradient Descent Dr. Xiaowei H(pdf)[ https://intranet.csc.liv.ac.uk/\~xiaowei/ai\_materials/14-Gradient-Descent.pdf](https://intranet.csc.liv.ac.uk/~xiaowei/ai_materials/14-Gradient-Descent.pdf) \[16] 梯度下降法收敛性证明\_mob6454cc6e409f的技术博客\_51CTO博客[ https://blog.51cto.com/u\_16099255/13569458](https://blog.51cto.com/u_16099255/13569458) \[17] Convexity, gradient descent and automatic differentiation[ https://people.math.wisc.edu/\~roch/mmids/opt-gd.slides.html#/](https://people.math.wisc.edu/~roch/mmids/opt-gd.slides.html#/) \[18] Lecture 4 - The Gradient Metho(pdf)[ https://www.tau.ac.il/\~becka/nlo/lec4\_gradient\_method\_revise.pdf](https://www.tau.ac.il/~becka/nlo/lec4_gradient_method_revise.pdf) \[19] Some notes on gradient descent[ https://inst.eecs.berkeley.edu/\~cs170/fa16/lecture-11-3.pdf](https://inst.eecs.berkeley.edu/~cs170/fa16/lecture-11-3.pdf) \[20] Gradient Descent[ https://ubcmath.github.io/MATH360/data-driven/numerical-methods/gradient.html](https://ubcmath.github.io/MATH360/data-driven/numerical-methods/gradient.html) \[21] LEARNING BY DIRECTIONAL GRADIENT DESCENT[ https://openreview.net/pdf?id=5i7lJLuhTm](https://openreview.net/pdf?id=5i7lJLuhTm) \[22] 梯度下降(Gradient Descent)的收敛性分析-CSDN博客[ https://blog.csdn.net/c9Yv2cf9I06K2A9E/article/details/123414639](https://blog.csdn.net/c9Yv2cf9I06K2A9E/article/details/123414639) \[23] On the Convergence of Gradient Descent for Large Learning Rates[ https://arxiv.org/html/2402.13108](https://arxiv.org/html/2402.13108) \[24] Lecture 7: Gradient Descent (and Beyond)[ https://www.cs.cornell.edu/courses/cs4780/2017sp/lectures/lecturenote07.html](https://www.cs.cornell.edu/courses/cs4780/2017sp/lectures/lecturenote07.html) \[25] Convergence analysis[ https://perso.esiee.fr/\~chierchg/optimization/content/07/convergence.html](https://perso.esiee.fr/~chierchg/optimization/content/07/convergence.html) \[26] Gradient descent (and beyond)[ https://www.cs.cornell.edu/courses/cs4780/2022fa/lectures/Opt.html](https://www.cs.cornell.edu/courses/cs4780/2022fa/lectures/Opt.html) \[27] Beyond Convexity - Contraction and Global Convergence of Gradient Descent(pdf)[ https://arxiv.org/pdf/1806.06655v3](https://arxiv.org/pdf/1806.06655v3) \[28] 9.3 Convergence analysis of gradient methods[ https://fiveable.me/mathematical-methods-for-optimization/unit-9/convergence-analysis-gradient-methods/study-guide/LflRJBFmRhOY0Qpv](https://fiveable.me/mathematical-methods-for-optimization/unit-9/convergence-analysis-gradient-methods/study-guide/LflRJBFmRhOY0Qpv) \[29] Lecture 10. Convergence Rate of Gradient Descent(pdf)[ https://jhc.sjtu.edu.cn/\~kuanyang/teaching/MATH3806/2023/notes/lec10.pdf](https://jhc.sjtu.edu.cn/~kuanyang/teaching/MATH3806/2023/notes/lec10.pdf) \[30] 数值优化:经典一阶确定性算法及其收敛性分析\_高维统计中的一阶算法-CSDN博客[ https://blog.csdn.net/pythonxxoo/article/details/125244204](https://blog.csdn.net/pythonxxoo/article/details/125244204) \[31] First-Order Algorithms Converge Faster than \$O(1/k)\$ on Convex Problems[ https://proceedings.mlr.press/v97/lee19e.html](https://proceedings.mlr.press/v97/lee19e.html) \[32] CPSC 540: Machine Learning Convex Functions, Gradient Descent, Convergence Rates(pdf)[ https://www.cs.ubc.ca/\~schmidtm/Courses/540-W16/L4.pdf](https://www.cs.ubc.ca/~schmidtm/Courses/540-W16/L4.pdf) \[33] Open Problem: Anytime Convergence Rate of Gradient Descent(pdf)[ https://proceedings.mlr.press/v247/kornowski24a/kornowski24a.pdf](https://proceedings.mlr.press/v247/kornowski24a/kornowski24a.pdf) \[34] From Convexity to Strong Convexity and Beyond: Bridging The Gap In Convergence Rates(pdf)[ https://shadow.merl.com/publications/docs/TR2024-131.pdf](https://shadow.merl.com/publications/docs/TR2024-131.pdf) \[35] Linear Convergence Rate in Convex Setup is Possible! Gradient Descent Method Variants under \\((L\_{0}, L\_{1})\\) -Smoothness(pdf)[ https://arxiv.org/pdf/2412.17050v1](https://arxiv.org/pdf/2412.17050v1) \[36] Part B: Chain Rule, Gradient and Directional Derivatives[ https://ocw.mit.edu/courses/18-02sc-multivariable-calculus-fall-2010/pages/2.-partial-derivatives/part-b-chain-rule-gradient-and-directional-derivatives/](https://ocw.mit.edu/courses/18-02sc-multivariable-calculus-fall-2010/pages/2.-partial-derivatives/part-b-chain-rule-gradient-and-directional-derivatives/) \[37] MULTIVARIABLE CALCULUS MATH S-[ https://people.math.harvard.edu/\~knill/teaching/summer2024/handouts/lecture12.pdf](https://people.math.harvard.edu/~knill/teaching/summer2024/handouts/lecture12.pdf) \[38] The Gradient and Directional Derivative[ https://sites.science.oregonstate.edu/math/home/programs/undergrad/CalculusQuestStudyGuides/vcalc/grad/grad.html](https://sites.science.oregonstate.edu/math/home/programs/undergrad/CalculusQuestStudyGuides/vcalc/grad/grad.html) \[39] Math 20C Multivariable Calculus Lecture 16[ https://users.math.msu.edu/users/gnagy/teaching/05-fall/math20c/w6-c.pdf](https://users.math.msu.edu/users/gnagy/teaching/05-fall/math20c/w6-c.pdf) \[40] Directional Derivatives and Gradient Vectors[ https://mathresearch.utsa.edu/wiki/index.php?title=Directional\_Derivatives\_and\_Gradient\_Vectors](https://mathresearch.utsa.edu/wiki/index.php?title=Directional_Derivatives_and_Gradient_Vectors) \[41] Session 38: Gradient and Directional Derivative[ https://ocw.mit.edu/courses/18-02sc-multivariable-calculus-fall-2010/resources/gradient-and-directional-derivative/](https://ocw.mit.edu/courses/18-02sc-multivariable-calculus-fall-2010/resources/gradient-and-directional-derivative/) \[42] Math 21a: Multivariable calcul(pdf)[ https://people.math.harvard.edu/\~knill/teaching/math21a2019/16-directional.pdf](https://people.math.harvard.edu/~knill/teaching/math21a2019/16-directional.pdf) \[43] 18 Mirror Descent The gradient[ https://www.cs.cmu.edu/\~15850/notes/lec20.pdf](https://www.cs.cmu.edu/~15850/notes/lec20.pdf) \[44] Lec8p1, ORF363/COS323[ http://www.princeton.edu/\~amirali/Public/Teaching/ORF363\_COS323/F15/ORF363\_COS323\_F15\_Lec8.pdf](http://www.princeton.edu/~amirali/Public/Teaching/ORF363_COS323/F15/ORF363_COS323_F15_Lec8.pdf) \[45] Chapter 4 - Optimization in machine learning[ https://people.math.wisc.edu/\~roch/mmids/math535-s22-f22/roch-mmids-opt-5gd.slides.html](https://people.math.wisc.edu/~roch/mmids/math535-s22-f22/roch-mmids-opt-5gd.slides.html) \[46] Chapter 17 Project Gradient Descend[ https://people.math.binghamton.edu/qiao/math605/book/project-gradient-descend.html](https://people.math.binghamton.edu/qiao/math605/book/project-gradient-descend.html) \[47] Lecture 3: Steepest and Gradient Descent-Part I[ http://katselis.web.engr.illinois.edu/ECE586/Lecture3.pdf](http://katselis.web.engr.illinois.edu/ECE586/Lecture3.pdf) \[48] 3.5. Gradient descent and its convergence analysis[ https://mmids-textbook.github.io/chap03\_opt/05\_gd/roch-mmids-opt-gd.html](https://mmids-textbook.github.io/chap03_opt/05_gd/roch-mmids-opt-gd.html) \[49] 【AI概念】梯度下降(Gradient Descent)vs 随机梯度下降(SGD)vs 批量梯度下降(Batch GD)详解(附详尽Python代码演示)| 定义与原理、数学公式、案例与代码可视化\_随机梯度下降(sgd)-CSDN博客[ https://blog.csdn.net/ai\_aijiang/article/details/148910448](https://blog.csdn.net/ai_aijiang/article/details/148910448) \[50] 🧠 Batch vs. Mini-Batch Gradient Descent in Machine Learning[ https://www.kaggle.com/discussions/general/576353](https://www.kaggle.com/discussions/general/576353) \[51] (pdf)[ https://courses.cs.washington.edu/courses/cse446/25au/sections/06/varun%27s-notes-section06.pdf](https://courses.cs.washington.edu/courses/cse446/25au/sections/06/varun%27s-notes-section06.pdf) \[52] Batch vs Stochastic Gradient Descent: Key Differences Explored[ https://www.studocu.com/en-us/document/university-of-georgia/data-science-i/what-is-the-difference-between-batch-gradient-descent-and-stochastic-gradient-descent/53608283](https://www.studocu.com/en-us/document/university-of-georgia/data-science-i/what-is-the-difference-between-batch-gradient-descent-and-stochastic-gradient-descent/53608283) \[53] Batch gradient descent vs Stochastic gradient descent[ https://www.bogotobogo.com/python/scikit-learn/scikit-learn\_batch-gradient-descent-versus-stochastic-gradient-descent.php](https://www.bogotobogo.com/python/scikit-learn/scikit-learn_batch-gradient-descent-versus-stochastic-gradient-descent.php) \[54] Dr. Subhabaha Pal’s Post[ https://www.linkedin.com/posts/dr-subhabaha-pal-0623b87\_stochastic-gradient-descent-vs-batch-gradient-activity-7110127970484125696-iDZB](https://www.linkedin.com/posts/dr-subhabaha-pal-0623b87_stochastic-gradient-descent-vs-batch-gradient-activity-7110127970484125696-iDZB) \[55] Batch Gradient Descent vs Stochastic Gradie Descent[ https://www.tutorialspoint.com/batch-gradient-descent-vs-stochastic-gradie-descent](https://www.tutorialspoint.com/batch-gradient-descent-vs-stochastic-gradie-descent) \[56] 简述在动量梯度下降法的基本思想 - CSDN文库[ https://wenku.csdn.net/answer/84qq7n0z54](https://wenku.csdn.net/answer/84qq7n0z54) \[57] Momentum[ https://optimization.cbe.cornell.edu/index.php?title=Momentum](https://optimization.cbe.cornell.edu/index.php?title=Momentum) \[58] CS-568 Deep Learning: Momentum-based Gradient Descent(pdf)[ http://faculty.pucit.edu.pk/nazarkhan/teaching/CS568/Lectures/momentum\_based\_gradient\_descent.pdf](http://faculty.pucit.edu.pk/nazarkhan/teaching/CS568/Lectures/momentum_based_gradient_descent.pdf) \[59] machine-learning-notes/docs/mathematics/gradient-update-algorithm/offline-learning/gradient-descent-algorithms/momentum/momentum.md at master · luweiagi/machine-learning-notes · GitHub[ https://github.com/luweiagi/machine-learning-notes/blob/master/docs/mathematics/gradient-update-algorithm/offline-learning/gradient-descent-algorithms/momentum/momentum.md](https://github.com/luweiagi/machine-learning-notes/blob/master/docs/mathematics/gradient-update-algorithm/offline-learning/gradient-descent-algorithms/momentum/momentum.md) \[60] CS-568 Deep Learning: Momentum-based Gradient Descent(pdf)[ http://faculty.pucit.edu.pk/nazarkhan/teaching/CS563/Lectures/momentum\_based\_gradient\_descent.pdf](http://faculty.pucit.edu.pk/nazarkhan/teaching/CS563/Lectures/momentum_based_gradient_descent.pdf) \[61] Gradient Descent with Momentum[ https://learn.codesignal.com/preview/lessons/3192/gradient-descent-with-momentum](https://learn.codesignal.com/preview/lessons/3192/gradient-descent-with-momentum) \[62] Gradient descent with momentum(pdf)[ https://www.ceremade.dauphine.fr/\~waldspurger/tds/22\_23\_s1/advanced\_gradient\_descent.pdf?ref=Pylogix.com](https://www.ceremade.dauphine.fr/~waldspurger/tds/22_23_s1/advanced_gradient_descent.pdf?ref=Pylogix.com) \[63] 【PyTorch入门】 PyTorch不同优化器的比较-腾讯云开发者社区-腾讯云[ https://cloud.tencent.cn/developer/article/2490061](https://cloud.tencent.cn/developer/article/2490061) \[64] 常见优化器对比:梯度下降法、带动量的梯度下降法、Adagrad、RMSProp、Adam-CSDN博客[ https://blog.csdn.net/weixin\_47748259/article/details/136914978](https://blog.csdn.net/weixin_47748259/article/details/136914978) \[65] Adaptive Optimizers[ https://clairedavid.github.io/intro\_to\_ml/nn/optim\_4\_adaptive\_methods.html](https://clairedavid.github.io/intro_to_ml/nn/optim_4_adaptive_methods.html) \[66] d2l-en/chapter\_optimization/adam.md at vol2-dp · d2l-ai/d2l-en · GitHub[ https://github.com/d2l-ai/d2l-en/blob/vol2-dp/chapter\_optimization/adam.md](https://github.com/d2l-ai/d2l-en/blob/vol2-dp/chapter_optimization/adam.md) \[67] Advanced Optimization: Understanding and Implementing ADAM[ https://learn.codesignal.com/preview/lessons/1042?utm\_medi%5D%5D%3E%3C%21%5BCDATA%5Bum=email](https://learn.codesignal.com/preview/lessons/1042?utm_medi%5D%5D%3E%3C%21%5BCDATA%5Bum=email) \[68] Adam[ https://optimization.cbe.cornell.edu/index.php?title=Adam](https://optimization.cbe.cornell.edu/index.php?title=Adam) \[69] 深度学习常用优化器解析-CSDN博客[ https://blog.csdn.net/2201\_76024043/article/details/153839561](https://blog.csdn.net/2201_76024043/article/details/153839561) \[70] 梯度下降算法内部优化机制详解\_梯度陷阱-CSDN博客[ https://blog.csdn.net/2401\_86968005/article/details/145833307](https://blog.csdn.net/2401_86968005/article/details/145833307) \[71] 6.2 Adaptive learning rate methods: AdaGrad, RMSprop, and Adam[ https://www.fiveable.me/deep-learning-systems/unit-6/adaptive-learning-rate-methods-adagrad-rmsprop-adam/study-guide/vGZc9BB9KkXjqsxD](https://www.fiveable.me/deep-learning-systems/unit-6/adaptive-learning-rate-methods-adagrad-rmsprop-adam/study-guide/vGZc9BB9KkXjqsxD) \[72] Escaping Saddle Points with Adaptive Gradient Methods[ https://www.arxiv-vanity.com/papers/1901.09149/](https://www.arxiv-vanity.com/papers/1901.09149/) \[73] A Comparison of Adaptive Algorithms Based on the Methods of SteePest Descent and Random .A Search[ https://isl.stanford.edu/people/widrow/papers/j1976acomparison.pdf](https://isl.stanford.edu/people/widrow/papers/j1976acomparison.pdf) \[74] Adagrad Optimizer Explained: How It Works, Implementation, & Comparisons[ https://www.datacamp.com/tutorial/adagrad-optimizer-explained](https://www.datacamp.com/tutorial/adagrad-optimizer-explained) \[75] Mastering Adagrad Optimization[ https://www.numberanalytics.com/blog/ultimate-guide-adagrad-optimization-methods](https://www.numberanalytics.com/blog/ultimate-guide-adagrad-optimization-methods) \[76] COMPARATIVE ANALYSIS OF GRADIENT DESCENT METHODS AND THEIR MODIFICATIONS FOR OPTIMIZING COMPLEX FUNCTIONS(pdf)[ http://intjournal.ru/wp-content/uploads/2024/11/Stulov.pdf](http://intjournal.ru/wp-content/uploads/2024/11/Stulov.pdf) \[77] 使用梯度下降法实现一元线性回归的Python程序\_51CTO学堂\_专业的IT技能学习平台[ https://edu.51cto.com/article/note/33948.html](https://edu.51cto.com/article/note/33948.html) \[78] Gradient Descent Implementation for Linear Regression[ https://github.com/kunalPisolkar24/gradientDescent](https://github.com/kunalPisolkar24/gradientDescent) \[79] Linear Regression Model: Gradient Descent[ https://www.kaggle.com/code/nelsonmasbayi/linear-regression-model-gradient-descent](https://www.kaggle.com/code/nelsonmasbayi/linear-regression-model-gradient-descent) \[80] BrainCode-AI-ML-From-Tensors-to-ANNs/Gradient Descent Linear Regression from Scratch.md at main · Mindful-AI-Assistants/BrainCode-AI-ML-From-Tensors-to-ANNs · GitHub[ https://github.com/Mindful-AI-Assistants/BrainCode-AI-ML-From-Tensors-to-ANNs/blob/main/Gradient%20Descent%20Linear%20Regression%20from%20Scratch.md](https://github.com/Mindful-AI-Assistants/BrainCode-AI-ML-From-Tensors-to-ANNs/blob/main/Gradient%20Descent%20Linear%20Regression%20from%20Scratch.md) \[81] How to use gradient descent algorithm for linear regression? - Tencent Cloud[ https://www.tencentcloud.com/techpedia/112019](https://www.tencentcloud.com/techpedia/112019) \[82] Linear regression: Gradient descent[ https://developers.google.com/machine-learning/crash-course/linear-regression/gradient-descent](https://developers.google.com/machine-learning/crash-course/linear-regression/gradient-descent) \[83] linear-regression-SGD[ https://github.com/touir1/linear-regression-SGD](https://github.com/touir1/linear-regression-SGD) \[84] 双剑合璧:梯度下降与反向传播——神经网络优化的核心引擎\_YNXZ的技术博客\_51CTO博客[ https://blog.51cto.com/yingnanxuezi/14068496](https://blog.51cto.com/yingnanxuezi/14068496) \[85] CS 179: LECTURE 14 NEURAL NETWORKS AND BACKPROPAGATION[ https://courses.cms.caltech.edu/cs179/Old/2019\_lectures/cs179\_2019\_lec14.pdf](https://courses.cms.caltech.edu/cs179/Old/2019_lectures/cs179_2019_lec14.pdf) \[86] Neural Networks: Training using backpropagation[ https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation) \[87] 反向传播算法\[适合于多层神经元网络的算法]\_百科[ https://m.baike.com/wiki/%E5%8F%8D%E5%90%91%E4%BC%A0%E6%92%AD%E7%AE%97%E6%B3%95/2453600?baike\_source=doubao](https://m.baike.com/wiki/%E5%8F%8D%E5%90%91%E4%BC%A0%E6%92%AD%E7%AE%97%E6%B3%95/2453600?baike_source=doubao) \[88] Backpropagation[ https://dlvu.github.io/backpropagation/](https://dlvu.github.io/backpropagation/) \[89] Derivation of Backpropagation [ https://www.cs.swarthmore.edu/\~meeden/cs81/s10/BackPropDeriv.pdf](https://www.cs.swarthmore.edu/~meeden/cs81/s10/BackPropDeriv.pdf) \[90] 实用指南:逻辑回归中的成本损失函数全解析:从数学推导到实际应用 - ycfenxi - 博客园[ https://www.cnblogs.com/ycfenxi/p/19117094](https://www.cnblogs.com/ycfenxi/p/19117094) \[91] Logistic regression: Loss and regularization[ https://developers.google.com/machine-learning/crash-course/logistic-regression/loss-regularization](https://developers.google.com/machine-learning/crash-course/logistic-regression/loss-regularization) \[92] (pdf)[ https://inst.eecs.berkeley.edu/\~cs188/su25/assets/discussions/cs188-su25-disc12.pdf](https://inst.eecs.berkeley.edu/~cs188/su25/assets/discussions/cs188-su25-disc12.pdf) \[93] Logistic Regression: Loss and Regularization[ https://developers.google.com/machine-learning/crash-course/logistic-regression/model-training](https://developers.google.com/machine-learning/crash-course/logistic-regression/model-training) \[94] Gradient Descent for Logistic Regression Simplified – Step by Step Visual Guide[ https://ucanalytics.com/blogs/gradient-descent-logistic-regression-simplified-step-step-visual-guide/](https://ucanalytics.com/blogs/gradient-descent-logistic-regression-simplified-step-step-visual-guide/) \[95] 9.7 Logistic Regression[ https://inst.eecs.berkeley.edu/\~cs188/textbook/ml/logistic.html](https://inst.eecs.berkeley.edu/~cs188/textbook/ml/logistic.html) \[96] CS-GY 6923: Lecture 5 Logistic Regression + Gradient Descent(pdf)[ https://www.chrismusco.com/machinelearning2022/lectures/lec5.pdf](https://www.chrismusco.com/machinelearning2022/lectures/lec5.pdf) \[97] P-packSVM: Parallel Primal grAdient desCent Kernel SVM[ https://www.microsoft.com/en-us/research/publication/p-packsvm-parallel-primal-gradient-descent-kernel-svm/](https://www.microsoft.com/en-us/research/publication/p-packsvm-parallel-primal-gradient-descent-kernel-svm/) \[98] 支持向量机参数优化:策略、方法与应用深度剖析.docx-原创力文档[ https://m.book118.com/html/2025/0916/6153240012011231.shtm](https://m.book118.com/html/2025/0916/6153240012011231.shtm) \[99] Pegasos: Primal Estimated sub-GrAdient SOlver for SVM[ http://ttic.uchicago.edu/\~shai/papers/ShalevSiSr07.pdf](http://ttic.uchicago.edu/~shai/papers/ShalevSiSr07.pdf) \[100] 31 Support Vector Machine[ http://docs.oracle.com/en/database/oracle/machine-learning/oml4sql/21/dmcon/support-vector-machine.html](http://docs.oracle.com/en/database/oracle/machine-learning/oml4sql/21/dmcon/support-vector-machine.html) \[101] (pdf)[ https://courses.grainger.illinois.edu/cs441/sp2023/lectures/Lecture%2008%20-%20SVMs%20and%20SGD.pdf](https://courses.grainger.illinois.edu/cs441/sp2023/lectures/Lecture%2008%20-%20SVMs%20and%20SGD.pdf) \[102] MACHINE-LEARNING-MODELS-and-their-IMPLEMENTATIONS/Support Vector Machine.ipynb at main · AbhyudayaTak/MACHINE-LEARNING-MODELS-and-their-IMPLEMENTATIONS · GitHub[ https://github.com/AbhyudayaTak/MACHINE-LEARNING-MODELS-and-their-IMPLEMENTATIONS/blob/main/Support%20Vector%20Machine.ipynb](https://github.com/AbhyudayaTak/MACHINE-LEARNING-MODELS-and-their-IMPLEMENTATIONS/blob/main/Support%20Vector%20Machine.ipynb) \[103] 牛顿法、拟牛顿法原理\_n维非线性方程最优解-CSDN博客[ https://blog.csdn.net/zgcr654321/article/details/89674713](https://blog.csdn.net/zgcr654321/article/details/89674713) \[104] Optimization methods[ https://github.com/konstmish/opt\_methods](https://github.com/konstmish/opt_methods) \[105] Comparison of Newton's Method in Optimisation and Gradient Descent[ https://github.com/chinglamchoi/Newtons-Method-vs-Gradient-Descent-on-Iris-Dataset](https://github.com/chinglamchoi/Newtons-Method-vs-Gradient-Descent-on-Iris-Dataset) \[106] Quasi-newton methods[ https://library.fiveable.me/key-terms/probability-and-mathematical-statistics-in-data-science/quasi-newton-methods](https://library.fiveable.me/key-terms/probability-and-mathematical-statistics-in-data-science/quasi-newton-methods) \[107] 常用优化算法\_多目标梯度优化算法-CSDN博客[ https://blog.csdn.net/qq\_31375855/article/details/85060342](https://blog.csdn.net/qq_31375855/article/details/85060342) \[108] Newton's Method for Optimization: A Deep Dive[ https://www.numberanalytics.com/blog/newtons-method-optimization-deep-dive](https://www.numberanalytics.com/blog/newtons-method-optimization-deep-dive) \[109] Quasi-Newton Methods[ https://algotradinglib.com/en/pedia/q/quasi-newton\_methods.html](https://algotradinglib.com/en/pedia/q/quasi-newton_methods.html) \[110] 梯度消失和梯度爆炸是什么-云社区-华为云[ https://bbs.huaweicloud.com/blogs/466398](https://bbs.huaweicloud.com/blogs/466398) \[111] (pdf)[ https://proceedings.neurips.cc/paper\_files/paper/2018/file/13f9896df61279c928f19721878fac41-Paper.pdf](https://proceedings.neurips.cc/paper_files/paper/2018/file/13f9896df61279c928f19721878fac41-Paper.pdf) \[112] Vanishing & exploding gradients(pdf)[ https://uvadlc.github.io/lectures/dec2020/lecture%205.2.pdf](https://uvadlc.github.io/lectures/dec2020/lecture%205.2.pdf) \[113] Vanishing & Exploding Gradients in Network Training - Deep Learning Dictionary[ https://deeplizard.com/lesson/ddv2idrzal](https://deeplizard.com/lesson/ddv2idrzal) \[114] Neural Networks: Training using backpropagation[ https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation](https://developers.google.com/machine-learning/crash-course/neural-networks/backpropagation) \[115] 4.4 Challenges in training deep networks: vanishing and exploding gradients[ https://fiveable.me/deep-learning-systems/unit-4/challenges-training-deep-networks-vanishing-exploding-gradients/study-guide/zjLYDeY23QWRaVx6](https://fiveable.me/deep-learning-systems/unit-4/challenges-training-deep-networks-vanishing-exploding-gradients/study-guide/zjLYDeY23QWRaVx6) \[116] 梯度协同:分布式深度学习的关键技术-CSDN博客[ https://blog.csdn.net/universsky2015/article/details/137289771](https://blog.csdn.net/universsky2015/article/details/137289771) \[117] An Optimistic Gradient Tracking Method for Distributed Minimax Optimization(pdf)[ https://arxiv.org/pdf/2508.21431v1](https://arxiv.org/pdf/2508.21431v1) \[118] Distributed[ https://www.cs.umd.edu/\~tomg/projects/distributedml/](https://www.cs.umd.edu/~tomg/projects/distributedml/) \[119] Efficient Gradient Tracking Algorithms for Distributed Optimization Problems with Inexact Communication(pdf)[ https://arxiv.org/pdf/2501.05737](https://arxiv.org/pdf/2501.05737) \[120] DISTRIBUTED STOCHASTIC OPTIMIZATION WITH LARGE DELAYS(pdf)[ https://web3.arxiv.org/pdf/2107.02919](https://web3.arxiv.org/pdf/2107.02919) \[121] Error Compensated Quantized SGD and its Applications to Large-scale Distributed Optimization[ https://proceedings.mlr.press/v80/wu18d.html](https://proceedings.mlr.press/v80/wu18d.html) \[122] S-D-RSM: Stochastic Distributed Regularized Splitting Method for Large-Scale Convex Optimization Problems[ https://arxiv.org/html/2511.10133v2/](https://arxiv.org/html/2511.10133v2/) \[123] D2P2-SGD: Dynamically Differentially Private Projected Stochastic Gradient Descent[ https://openreview.net/forum?id=nM2kuesKpC](https://openreview.net/forum?id=nM2kuesKpC) \[124] (pdf)[ https://openreview.net/pdf/f637a1877b3732e27b236e8310bdcd3714f27b37.pdf](https://openreview.net/pdf/f637a1877b3732e27b236e8310bdcd3714f27b37.pdf) \[125] Asynchronous stochastic gradient descent with decoupled backpropagation and layer-wise updates[ https://arxiv.org/pdf/2410.05985v3](https://arxiv.org/pdf/2410.05985v3) \[126] Controlling the Flow: Stability and Convergence for Stochastic Gradient Descent with Decaying Regularization[ https://arxiv.org/html/2505.11434v1](https://arxiv.org/html/2505.11434v1) \[127] Stochastic Polyak Step-sizes and Momentum: Convergence Guarantees and Practical Performance[ https://openreview.net/forum?id=rH3hCjjLqS](https://openreview.net/forum?id=rH3hCjjLqS) \[128] Decentralized Markov Chain Gradient Descent[ https://openreview.net/forum?id=UEk8tXZ8FHS](https://openreview.net/forum?id=UEk8tXZ8FHS) \[129] Depen Morwani[ https://www.catalyzex.com/author/Depen%20Morwani](https://www.catalyzex.com/author/Depen%20Morwani) \[130] pytorch、tensorflow对比学习—功能组件(优化器、评估指标、Module管理)\_model.fit pytorch-CSDN博客[ https://blog.csdn.net/qq\_58832911/article/details/125954155](https://blog.csdn.net/qq_58832911/article/details/125954155) \[131] tf. keras. optimizers. legacy. SGD[ https://www.tensorflow.org/api\_docs/python/tf/keras/optimizers/legacy/SGD](https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/legacy/SGD) \[132] Optimizers with Core APIs[ https://www.tensorflow.org/guide/core/optimizers\_core](https://www.tensorflow.org/guide/core/optimizers_core) \[133] Introduction to Deep Learning with PyTorch > Automatic Gradient Descent with PyTorch Optimisers | Python Programming | Department of Computing | Imperial College London[ https://python.pages.doc.ic.ac.uk/lessons/pytorch/04-autograd/07-automatic-gradient-descent.html](https://python.pages.doc.ic.ac.uk/lessons/pytorch/04-autograd/07-automatic-gradient-descent.html) \[134] pytorch/torch/optim/sgd.py at main · pytorch/pytorch · GitHub[ https://github.com/pytorch/pytorch/blob/main/torch/optim/sgd.py](https://github.com/pytorch/pytorch/blob/main/torch/optim/sgd.py) \[135] tf.compat.v1.train.GradientDescentOptimizer[ https://www.tensorflow.org/api\_docs/python/tf/compat/v1/train/GradientDescentOptimizer](https://www.tensorflow.org/api_docs/python/tf/compat/v1/train/GradientDescentOptimizer) \[136] A Tour of PyTorch Optimizers[ https://github.com/bentrevett/a-tour-of-pytorch-optimizers/blob/main/a-tour-of-pytorch-optimizers.ipynb](https://github.com/bentrevett/a-tour-of-pytorch-optimizers/blob/main/a-tour-of-pytorch-optimizers.ipynb) \[137] 梯度下降的学习率与批大小 - PKICA - 博客园[ https://www.cnblogs.com/guxuanqing/p/19217011](https://www.cnblogs.com/guxuanqing/p/19217011) \[138] 学习率和BatchSize的关系[ https://github.com/luweiagi/machine-learning-notes/blob/master/docs/deep-learning/tips/learning-rate/learning-rate-and-batch-size/learning-rate-and-batch-size.md](https://github.com/luweiagi/machine-learning-notes/blob/master/docs/deep-learning/tips/learning-rate/learning-rate-and-batch-size/learning-rate-and-batch-size.md) \[139] Seesaw: Accelerating Training by Balancing Learning Rate and Batch Size Scheduling(pdf)[ https://web3.arxiv.org/pdf/2510.14717](https://web3.arxiv.org/pdf/2510.14717) \[140] Coupling Adaptive Batch Sizes with Learning Rates(pdf)[ https://uni-tuebingen.de/securedl/sdl-eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODg3MjYwNzIsImV4cCI6MTY4ODgxNjA3MCwidXNlciI6MCwiZ3JvdXBzIjpbMCwtMV0sImZpbGUiOiJmaWxlYWRtaW5cL1VuaV9UdWViaW5nZW5cL0Zha3VsdGFldGVuXC9NYXROYXRcL0ZhY2hiZXJlaWNoZVwvSW5mb3JtYXRpa1wvTGVocnN0dWVobGVcL01ldGhNYXNjaExlcm5cL0Rva3VtZW50ZVwvcGFwZXJfcGRmXC9CYWxsZXMxN2EucGRmIiwicGFnZSI6MTM0NDQ2fQ.\_vWKhW\_Z-EPvxx90xkXvyWjIcrIeM\_PH9wQgq-qILGs/Balles17a.pdf](https://uni-tuebingen.de/securedl/sdl-eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2ODg3MjYwNzIsImV4cCI6MTY4ODgxNjA3MCwidXNlciI6MCwiZ3JvdXBzIjpbMCwtMV0sImZpbGUiOiJmaWxlYWRtaW5cL1VuaV9UdWViaW5nZW5cL0Zha3VsdGFldGVuXC9NYXROYXRcL0ZhY2hiZXJlaWNoZVwvSW5mb3JtYXRpa1wvTGVocnN0dWVobGVcL01ldGhNYXNjaExlcm5cL0Rva3VtZW50ZVwvcGFwZXJfcGRmXC9CYWxsZXMxN2EucGRmIiwicGFnZSI6MTM0NDQ2fQ._vWKhW_Z-EPvxx90xkXvyWjIcrIeM_PH9wQgq-qILGs/Balles17a.pdf) \[141] Surge Phenomenon in Optimal Learning Rate and Batch Size Scaling(pdf)[ https://www.arxiv.org/pdf/2405.14578](https://www.arxiv.org/pdf/2405.14578) \[142] Accelerating SGDM via Learning Rate and Batch Size Schedules: A Lyapunov-Based Analysis(pdf)[ https://arxiv.org/pdf/2508.03105v2](https://arxiv.org/pdf/2508.03105v2) \[143] 自定义LearningRateScheduler[ https://github.com/luweiagi/machine-learning-notes/blob/master/docs/deep-learning/tips/learning-rate/custom\_lr\_scheduler/custom\_lr\_scheduler.md](https://github.com/luweiagi/machine-learning-notes/blob/master/docs/deep-learning/tips/learning-rate/custom_lr_scheduler/custom_lr_scheduler.md) \[144] ConvNeXt训练技巧:梯度裁剪与混合精度训练-CSDN博客[ https://blog.csdn.net/gitblog\_00415/article/details/151788597](https://blog.csdn.net/gitblog_00415/article/details/151788597) \[145] Automatic Mixed Precision for Deep Learning | NVIDIA Developer[ https://developer.nvidia.com/automatic-mixed-precision/](https://developer.nvidia.com/automatic-mixed-precision/) \[146] Train With Mixed Precision[ https://docs.nvidia.com/deeplearning/performance/mixed-precision-training/index.html?ref=hackernoon.com](https://docs.nvidia.com/deeplearning/performance/mixed-precision-training/index.html?ref=hackernoon.com) \[147] Introducing Mixed Precision Training in Opacus[ https://pytorch.org/blog/introducing-mixed-precision-training-in-opacus/?ajs\_aid=0e0e0360-69f1-4989-b66a-6dd3478d68fe](https://pytorch.org/blog/introducing-mixed-precision-training-in-opacus/?ajs_aid=0e0e0360-69f1-4989-b66a-6dd3478d68fe) \[148] Automatic Mixed Precision examples[ https://glaringlee.github.io/notes/amp\_examples.html](https://glaringlee.github.io/notes/amp_examples.html) \[149] Training Overview and Features[ https://www.deepspeed.ai/training/](https://www.deepspeed.ai/training/) \[150] How to Use Mixed Precision Training to Double Training Speed in 2025[ https://markaicode.com/mixed-precision-training-double-speed/](https://markaicode.com/mixed-precision-training-double-speed/) \[151] 深度学习中的GPU加速与自动微分 - CSDN文库[ https://wenku.csdn.net/column/j4hx4t4xgy](https://wenku.csdn.net/column/j4hx4t4xgy) \[152] Locality-Aware Automatic Differentiation on the GPU for Mesh-Based Computations(pdf)[ https://arxiv.org/pdf/2509.00406](https://arxiv.org/pdf/2509.00406) \[153] CALCULATING THE PROJECTIVE NORM OF HIGHER-ORDER TENSORS USING A GRADIENT DESCENT ALGORITHM[ https://arxiv.org/pdf/2508.07933](https://arxiv.org/pdf/2508.07933) \[154] Solutions accélérées par GPU pour la science des données | NVIDIA[ https://www.nvidia.com/fr-fr/deep-learning-ai/solutions/data-science/?ncid=so-twit-75138%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid](https://www.nvidia.com/fr-fr/deep-learning-ai/solutions/data-science/?ncid=so-twit-75138%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid%3Fncid) \[155] Soluciones aceleradas por GPU para la ciencia de datos | NVIDIA[ https://www.nvidia.com/es-es/deep-learning-ai/solutions/data-science/?ncid=no-ncid%3Fncid%3Fncid%3Fncid%3Fncid](https://www.nvidia.com/es-es/deep-learning-ai/solutions/data-science/?ncid=no-ncid%3Fncid%3Fncid%3Fncid%3Fncid) \[156] Supporting Thrust API in Clad - Final Report[ https://compiler-research.org/blogs/gsoc25\_elrawy\_wrapup\_blog/](https://compiler-research.org/blogs/gsoc25_elrawy_wrapup_blog/) \[157] Performance Portable Gradient Computations Using Source Transformation(pdf)[ https://www.arxiv.org/pdf/2507.13204](https://www.arxiv.org/pdf/2507.13204) \[158] 批量梯度下降(BGD)、随机梯度下降(SGD)和小批量梯度下降(MBGD)的性能差异\_sgd和bgd的mse曲线对比-CSDN博客[ https://blog.csdn.net/xyzroundo/article/details/150446688](https://blog.csdn.net/xyzroundo/article/details/150446688) \[159] Armijo Line-search Can Make (Stochastic) Gradient Descent Provably Faster[ https://openreview.net/forum?id=LKQIS65fgd\&referrer=%5Bthe%20profile%20of%20Sharan%20Vaswani%5D%28%2Fprofile%3Fid=%7ESharan\_Vaswani1%29](https://openreview.net/forum?id=LKQIS65fgd\&referrer=%5Bthe%20profile%20of%20Sharan%20Vaswani%5D%28%2Fprofile%3Fid=%7ESharan_Vaswani1%29) \[160] Minimax Optimal Convergence of Gradient Descent in Logistic Regression via Large and Adaptive Stepsizes[ https://arxiv.org/html/2504.04105v1](https://arxiv.org/html/2504.04105v1) \[161] Almost Sure Convergence Rates Analysis and Saddle Avoidance of Stochastic Gradient Methods(pdf)[ https://dl.acm.org/doi/pdf/10.5555/3722577.3722848](https://dl.acm.org/doi/pdf/10.5555/3722577.3722848) \[162] COMPARATIVE ANALYSIS OF GRADIENT DESCENT METHODS AND THEIR MODIFICATIONS FOR OPTIMIZING COMPLEX FUNCTIONS(pdf)[ http://intjournal.ru/wp-content/uploads/2024/11/Stulov.pdf](http://intjournal.ru/wp-content/uploads/2024/11/Stulov.pdf) \[163] A Comparative Study of Gradient Descent Methods in Deep Learning Using Body Motion Dataset(pdf)[ http://www.pertanika2.upm.edu.my/resources/files/Pertanika%20PAPERS/JST%20Vol.%2033%20(4)%20Jul.%202025/13%20JST-5636-2024.pdf](http://www.pertanika2.upm.edu.my/resources/files/Pertanika%20PAPERS/JST%20Vol.%2033%20\(4\)%20Jul.%202025/13%20JST-5636-2024.pdf) \[164] Convergence Properties of Natural Gradient Descent for Minimizing KL Divergence[ https://openreview.net/forum?id=h6hjjAF5Bj](https://openreview.net/forum?id=h6hjjAF5Bj) \[165] 量子计算赋能AI:优化大模型训练中的梯度下降-腾讯云开发者社区-腾讯云[ https://cloud.tencent.com.cn/developer/article/2490894?frompage=seopage\&policyId=20240000\&traceId=01k0st4t3hdxtaq19b8p8123jy](https://cloud.tencent.com.cn/developer/article/2490894?frompage=seopage\&policyId=20240000\&traceId=01k0st4t3hdxtaq19b8p8123jy) \[166] Stochastic gradient descent: A first look[ https://damek.github.io/STAT-4830/section/6/notes.html](https://damek.github.io/STAT-4830/section/6/notes.html) \[167] Challenges with Standard Gradient Descent[ https://apxml.com/courses/deep-learning-regularization-optimization/chapter-5-foundational-optimizers/gradient-descent-challenges](https://apxml.com/courses/deep-learning-regularization-optimization/chapter-5-foundational-optimizers/gradient-descent-challenges) \[168] Incremental Gradient Descent with Small Epoch Counts is Surprisingly Slow on Ill-Conditioned Problems(pdf)[ https://arxiv.org/pdf/2506.04126](https://arxiv.org/pdf/2506.04126) \[169] Tasks regarding Theory of Gradient Descent and Normal Equation(pdf)[ https://sf.infs.ch/wp-content/uploads/1287/Solutions\_to\_all\_tasks\_2024\_02\_12.pdf](https://sf.infs.ch/wp-content/uploads/1287/Solutions_to_all_tasks_2024_02_12.pdf) \[170] Computer Scientists Discover Limits of Major Research Algorithm[ https://www.quantamagazine.org/computer-scientists-discover-limits-of-major-research-algorithm-20210817](https://www.quantamagazine.org/computer-scientists-discover-limits-of-major-research-algorithm-20210817) \[171] Gradient descent - Wikipedia[ https://static.hlt.bme.hu/semantics/external/pages/backprop/en.wikipedia.org/wiki/Gradient\_descent.html](https://static.hlt.bme.hu/semantics/external/pages/backprop/en.wikipedia.org/wiki/Gradient_descent.html) \[172] 梯度下降法(Gradient Descent) -- 现代机器学习的血液\_梯度下降光流优化-CSDN博客[ https://blog.csdn.net/AOIWB/article/details/145956165](https://blog.csdn.net/AOIWB/article/details/145956165) \[173] What are the advantages and disadvantages of the gradient descent algorithm? - Tencent Cloud[ https://www.tencentcloud.com/techpedia/112017](https://www.tencentcloud.com/techpedia/112017) \[174] Using Gradient Descent for Optimization and Learning[ https://www.math.ucdavis.edu/\~strohmer/courses/270/graddescent.pdf](https://www.math.ucdavis.edu/~strohmer/courses/270/graddescent.pdf) \[175] Gradient Descent Algorithm Survey[ https://arxiv.org/pdf/2511.20725](https://arxiv.org/pdf/2511.20725) \[176] What is Gradient descent?[ https://klu.ai/glossary/gradient-descent](https://klu.ai/glossary/gradient-descent) \[177] 深入学习——梯度下降优化算法—挑战、瓶颈与未来发展\_传统梯度下降方法的演进与挑战-CSDN博客[ https://blog.csdn.net/weixin\_43199439/article/details/143984444](https://blog.csdn.net/weixin_43199439/article/details/143984444) \[178] Provable Complexity Improvement of AdaGrad over SGD: Upper and Lower Bounds in Stochastic Non-Convex Optimization(pdf)[ https://raw.githubusercontent.com/mlresearch/v291/main/assets/jiang25c/jiang25c.pdf](https://raw.githubusercontent.com/mlresearch/v291/main/assets/jiang25c/jiang25c.pdf) \[179] 【AI概念】梯度下降(Gradient Descent)vs 随机梯度下降(SGD)vs 批量梯度下降(Batch GD)详解(附详尽Python代码演示)| 定义与原理、数学公式、案例与代码可视化\_随机梯度下降(sgd)-CSDN博客[ https://blog.csdn.net/ai\_aijiang/article/details/148910448](https://blog.csdn.net/ai_aijiang/article/details/148910448) \[180] 🧠 Batch vs. Mini-Batch Gradient Descent in Machine Learning[ https://www.kaggle.com/discussions/general/576353](https://www.kaggle.com/discussions/general/576353) \[181] (pdf)[ https://courses.cs.washington.edu/courses/cse446/25au/sections/06/varun%27s-notes-section06.pdf](https://courses.cs.washington.edu/courses/cse446/25au/sections/06/varun%27s-notes-section06.pdf) \[182] Batch Gradient Descent vs Stochastic Gradie Descent[ https://www.tutorialspoint.com/batch-gradient-descent-vs-stochastic-gradie-descent](https://www.tutorialspoint.com/batch-gradient-descent-vs-stochastic-gradie-descent) \[183] Batch vs Stochastic Gradient Descent: Key Differences Explored[ https://www.studocu.com/en-us/document/university-of-georgia/data-science-i/what-is-the-difference-between-batch-gradient-descent-and-stochastic-gradient-descent/53608283](https://www.studocu.com/en-us/document/university-of-georgia/data-science-i/what-is-the-difference-between-batch-gradient-descent-and-stochastic-gradient-descent/53608283) \[184] Batch gradient descent vs Stochastic gradient descent[ https://www.bogotobogo.com/python/scikit-learn/scikit-learn\_batch-gradient-descent-versus-stochastic-gradient-descent.php](https://www.bogotobogo.com/python/scikit-learn/scikit-learn_batch-gradient-descent-versus-stochastic-gradient-descent.php) \[185] MLAlgorithmsImplementationNotebooks/StochasticGDvsBatchGD.ipynb at main · Suthar345Piyush/MLAlgorithmsImplementationNotebooks · GitHub[ https://github.com/Suthar345Piyush/MLAlgorithmsImplementationNotebooks/blob/main/StochasticGDvsBatchGD.ipynb](https://github.com/Suthar345Piyush/MLAlgorithmsImplementationNotebooks/blob/main/StochasticGDvsBatchGD.ipynb)
#资源# 《https://wx.zsxq.com/mweb/views/weread/search.html?keyword=Pytorch动手实现深度学习》PDF版
#资源# 深度学习常考问题:深度学习方向和保研、考研面试适用
求一份机器学习的路线,最好有每个模块的推荐视频#机器学习#
今天先发代码,明天发改进版的技术文档[嘿哈]
#人工智能# #机器学习# 分享一下周哥的机器学习方面的笔记有需要自取 完整版看压缩包里面的md文件 然后有想详细了解的朋友可以看下面的人工智能链接文件 链接:https://pan.baidu.com/s/1PniO-ikBk9IhGvZSdaBKRg 提取码:9999 --来自百度网盘超级会员V2的分享 链接:https://pan.baidu.com/s/1xhQWaA4jdZLqbKNOSG5gXQ 提取码:9999 --来自百度网盘超级会员V2的分享 解压密码:VIPC6.COM_tPa517123N
#技术# #分享# 最近想用Java复习一下ML的经典算法,找到一个和Python中Numpy包相媲美的多维数组数学运算库DJL https://blog.csdn.net/a419240016/article/details/108396134
#机器学习-聚类-Kmeans
#机器学习-聚类-Kmeans #小白 #大一 #才开始学习 #笔记 #望大佬指导 无监督学习-聚类 技术路线:sklearn.cluster.Kmeans1.Kmeans算法介绍: 以k为参数,把n个对象分成k个簇,使簇内具有较高的相似 度,而簇间的相似度较低。 其处理过程如下: 1.随机选择k个点作为初始的聚类中心; 2.对于剩下的点,根据其与聚类中心的距离,将其归入最近的簇 3.对每个簇,...
