Seesaw Loss
Seesaw Loss
**Seesaw Loss** is a loss function for long-tailed instance segmentation. It dynamically re-balances the gradients of positive and negative samples on a tail class with two complementary factors: mitigation factor and compensation factor. The mitigation factor reduces punishments to tail categories w.r.t the ratio of cumulative training instances between different categories. Meanwhile, the compensation factor increases the penalty of misclassified instances to avoid false positives of tail categories. The synergy of the two factors enables Seesaw Loss to mitigate the overwhelming punishments on tail classes as well as compensate for the risk of misclassification caused by diminished penalties.

$$ L\_{seesaw}\left(\mathbf{x}\right) = - \sum^{C}\_{i=1}y\_{i}\log\left(\hat{\sigma}\_{i}\right) $$

$$ \text{with } \hat{\sigma\_{i}} = \frac{e^{z\_{i}}}{- \sum^{C}\_{j\neq{1}}\mathcal{S}\_{ij}e^{z\_{j}}+e^{z\_{i}} } $$

Here $\mathcal{S}\_{ij}$ works as a tunable balancing factor between different classes. By a careful design of $\mathcal{S}\_{ij}$, Seesaw loss adjusts the punishments on class j from positive samples of class $i$. Seesaw loss determines $\mathcal{S}\_{ij}$ by a mitigation factor and a compensation factor, as:

$$ \mathcal{S}\_{ij} =\mathcal{M}\_{ij} · \mathcal{C}\_{ij}  $$

The mitigation factor $\mathcal{M}\_{ij}$ decreases the penalty on tail class $j$ according to a ratio of instance numbers between tail class $j$ and head class $i$. The compensation factor $\mathcal{C}\_{ij}$ increases the penalty on class $j$ whenever an instance of class $i$ is misclassified to class $j$.
Seesaw Loss for Long-Tailed Instance Segmentation
https://paperswithcode.com/paper/seesaw-loss-for-long-tailed-instance
Seesaw Loss for Long-Tailed Instance Segmentation