Three Losses, Two Misses

Calculus in Deep LearningMedium+20 XP+20

Three Losses, Two Misses

Newton's method swaps the learning rate for 1/f′′1/f''1/f′′, so it cares about one property of a loss more than any other: its curvature, the second derivative. A team wants to compare how sharply three common losses bend when a prediction misses by a little and when it misses by a lot.

Two regression losses, written as functions of the error r=y^−yr = \hat{y} - yr=y^​−y on a single example:

  • Squared error: L(r)=r2L(r) = r^2L(r)=r2
  • Huber loss with δ=1\delta = 1δ=1:
L(r)={12r2if ∣r∣≤1∣r∣−12if ∣r∣>1L(r) = \begin{cases} \tfrac{1}{2}r^2 & \text{if } |r| \le 1 \\ |r| - \tfrac{1}{2} & \text{if } |r| > 1 \end{cases}L(r)={21​r2∣r∣−21​​if ∣r∣≤1if ∣r∣>1​

One classification loss. A yes/no classifier looks at an example whose true answer is yes. It emits a raw score zzz, turns it into a probability with the sigmoid p=σ(z)=11+e−zp = \sigma(z) = \dfrac{1}{1 + e^{-z}}p=σ(z)=1+e−z1​, and pays the cross-entropy loss −ln⁡p-\ln p−lnp. The model's parameters set zzz directly, so treat this loss as a function of zzz:

L(z)=−ln⁡σ(z)L(z) = -\ln \sigma(z)L(z)=−lnσ(z)

The two situations to compare:

regression errorclassifier score
small missr=0.5r = 0.5r=0.5z=0z = 0z=0 (unsure, p=0.5p = 0.5p=0.5)
big missr=4r = 4r=4z=−4z = -4z=−4 (confidently wrong, p≈0.018p \approx 0.018p≈0.018)

Take each loss's second derivative (with respect to rrr for the two regression losses, and with respect to zzz for cross-entropy) at the small miss and at the big miss.

Which statement is correct? Values are rounded to two significant figures.

Hints

Solve it to unlock the solution

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

Select all that apply.