PolyLoss is a loss-function framework that rewrites cross-entropy and Focal Loss as sums of polynomials in so that their coefficients can be tuned to the task. It was proposed by Leng et al. in 2022. The form used in practice is Poly-1, which adds just one term to cross-entropy.
is the probability the model assigns to the correct class. is the one new value (a hyperparameter); with , the loss is identical to cross-entropy.
The motivation was that the choice of classification loss had become almost binary.
- The loss is almost always cross-entropy or Focal Loss: Cross-entropy is standard for image classification, and Focal Loss is standard for object detection with heavy class imbalance. But nothing guarantees that the best loss for every task and dataset is one of these two.
- Designing a loss freely leaves too many options: Any differentiable function can serve as a loss, so searching without guidance is hard.
PolyLoss uses the idea of the Taylor expansion, which approximates a function by a sum of polynomials, to put these two losses in the same form. The left side of the figure at the top shows the relationship between and the loss, and the right side shows the coefficients when each loss is written as polynomials. The coefficients of cross-entropy are , and Focal Loss shifts this sequence of coefficients to the right (toward higher degrees). Poly-1 of PolyLoss moves only the first coefficient up or down. With the loss becomes steeper than cross-entropy, and with it becomes flatter.
As an analogy, the method treats cross-entropy and Focal Loss as two settings of an audio device with the same knobs (coefficients), and turns just one knob to tune the sound to the task.

