Sigmoid: s(x) = 1 / (1 + e^(-x)) has derivative s(x) times (1 - s(x)), with a maximum of 0.25 at x = 0; it approaches zero for large positive or negative inputs, which explains vanishing gradients.
Softmax p_i = e^(z_i) / sum of e^(z_j) has derivative p_i x (1 - p_i) with respect to its own logit and minus p_i x p_j with respect to another logit.
Combined with cross-entropy, the gradient with respect to the logits collapses to p minus y, which is why the fused loss is both simple and stable.
Loading…