The Gradient of Log Loss on a Negative Example

Derivative RulesHard+30 XP+30

The Gradient of Log Loss on a Negative Example

A binary classifier turns a raw score zzz into a probability with the sigmoid

p(z)=11+e−zp(z) = \frac{1}{1 + e^{-z}}p(z)=1+e−z1​

For a training example whose true label is 0\mathbf{0}0, the correct answer has probability 1−p1 - p1−p, so the cross-entropy loss is

L(z)=−ln⁡(1−p(z))L(z) = -\ln\left(1 - p(z)\right)L(z)=−ln(1−p(z))

Backpropagation needs the gradient of the loss with respect to the raw score, all the way through both the logarithm and the sigmoid.

At the point z=ln⁡3z = \ln 3z=ln3, what is dLdz\dfrac{dL}{dz}dzdL​?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.