Tag: numerical-stability
-
【AI 核心深度 M1-072】解释 Kahan 求和与浮点误差累积。(Explain Kahan Summation and How It Mitigates Floating-Point Accumulation Errors)深度数理推导与工程落地解析
浮点加法不满足结合律;大数吃小数导致误差累积,Kahan 用补偿项恢复精度。
-
【AI 核心深度 M1-031】为什么 softmax 必须先减最大值?(Explain Why Softmax Must Subtract the Maximum Value and How It Prevents Numerical Overflow)深度数理推导与工程落地解析
exp 对大正数溢出为 inf;减去最大值后指数最大为 0,结果不变但数值安全。
-
【AI 核心深度 M1-033】解释混合精度训练中的 loss scaling,为什么它能防梯度下溢。(Explain Loss Scaling in Mixed Precision (FP16/BF16) Training and How It Prevents Underflow)深度数理推导与工程落地解析
FP16 最小正规数很小,梯度易下溢为 0;把 loss 放大 S 倍,梯度同比放大,更新前再除回。
-
【AI 核心深度 M1-035】列举深度学习中常见的数值不稳定来源,以及各自的缓解手段。(Enumerate Common Sources of Numerical Instability in Deep Learning and Their Standard Industrial Mitigations)深度数理推导与工程落地解析
来源:指数溢出、除零、log(0)、梯度爆炸/下溢、FP16 范围、方差过小归一化。