[Notes] PolyLoss: A Polynomial Expansion Perspective of Classification Loss Functions
Photo Credit Introduction Recall that an one-dimensional Taylor series is an expansion of a real function $f(x)$ about a point $x = a$ [2]: $$f(x) = f(a) + f'(a)(x-a) + \frac{f''(a)}{2!}(x-a)^2 + .. + \frac{f^{n}(a)}{n!}(x-a)^n + ...$$ We can approximate the cross-entropy loss using the Taylor series (a.k.a. Taylor expansion) using $a = 1$: $$f(x) = -log(x) = 0 + (-1)(1)^{-1}(x-1) + (-1)^2(1)^{-2}\frac{(x-1)^2}{2} + ... \\ = \sum^{\infty}_{j=1}(-1)^j\frac{(j-1)!}{j!}(x-1)^{j} = \sum^{\infty}_{j=1}\frac{(1-x)^{j}}{j} $$ We can get the expansion for the focal loss simply by multiplying the cross-entropy loss series by $(1-x)^\gamma$: ...