Harsh Rangwani, Sumukh K Aithal, Mayank Mishra, R. Venkatesh Babu
Real-world datasets exhibit imbalances of varying types and degrees. Several techniques based on re-weighting and margin adjustment of loss are often used to enhance the performance of neural networks, particularly on minority classes. In this work, we analyze the class-imbalanced learning problem by examining the loss landscape of neural networks trained with re-weighting and margin-based techniques. Specifically, we examine the spectral density of Hessian of class-wise loss, through which we observe that the network weights converge to a saddle point in the loss landscapes of minority classes. Following this observation, we also find that optimization methods designed to escape from saddle points can be effectively used to improve generalization on minority classes. We further theoretically and empirically demonstrate that Sharpness-Aware Minimization (SAM), a recent technique that encourages convergence to a flat minima, can be effectively used to escape saddle points for minority classes. Using SAM results in a 6.2\% increase in accuracy on the minority classes over the state-of-the-art Vector Scaling Loss, leading to an overall average increase of 4\% across imbalanced datasets. The code is available at: https://github.com/val-iisc/Saddle-LongTail.
| Task | Dataset | Metric | Value | Model |
|---|---|---|---|---|
| Image Classification | CIFAR-100-LT (ρ=200) | Error Rate | 52 | PaCo + SAM |
| Image Classification | CIFAR-10-LT (ρ=10) | Error Rate | 10.6 | LDAM + DRW + SAM |
| Image Classification | iNaturalist 2018 | Top-1 Accuracy | 70.1 | LDAM + DRW + SAM |
| Image Classification | CIFAR-100-LT (ρ=50) | Error Rate | 34.72 | GLMC + SAM |
| Image Classification | ImageNet-LT | Top-1 Accuracy | 53.1 | LDAM + DRW + SAM |
| Image Classification | CIFAR-10-LT (ρ=50) | Error Rate | 8.44 | GLMC + SAM |
| Image Classification | CIFAR-100-LT (ρ=100) | Error Rate | 40.99 | GLMC + SAM |
| Image Classification | CIFAR-100-LT (ρ=100) | Error Rate | 47 | PaCo + SAM |
| Image Classification | CIFAR-100-LT (ρ=100) | Error Rate | 53.4 | VS + SAM |
| Image Classification | CIFAR-10-LT (ρ=100) | Error Rate | 10.82 | GLMC + SAM |
| Image Classification | CIFAR-10-LT (ρ=100) | Error Rate | 17.6 | VS + SAM |
| Image Classification | CIFAR-10-LT (ρ=200) | Error Rate | 21.9 | LDAM + DRW + SAM |
| Few-Shot Image Classification | CIFAR-100-LT (ρ=200) | Error Rate | 52 | PaCo + SAM |
| Few-Shot Image Classification | CIFAR-10-LT (ρ=10) | Error Rate | 10.6 | LDAM + DRW + SAM |
| Few-Shot Image Classification | iNaturalist 2018 | Top-1 Accuracy | 70.1 | LDAM + DRW + SAM |
| Few-Shot Image Classification | CIFAR-100-LT (ρ=50) | Error Rate | 34.72 | GLMC + SAM |
| Few-Shot Image Classification | ImageNet-LT | Top-1 Accuracy | 53.1 | LDAM + DRW + SAM |
| Few-Shot Image Classification | CIFAR-10-LT (ρ=50) | Error Rate | 8.44 | GLMC + SAM |
| Few-Shot Image Classification | CIFAR-100-LT (ρ=100) | Error Rate | 40.99 | GLMC + SAM |
| Few-Shot Image Classification | CIFAR-100-LT (ρ=100) | Error Rate | 47 | PaCo + SAM |
| Few-Shot Image Classification | CIFAR-100-LT (ρ=100) | Error Rate | 53.4 | VS + SAM |
| Few-Shot Image Classification | CIFAR-10-LT (ρ=100) | Error Rate | 10.82 | GLMC + SAM |
| Few-Shot Image Classification | CIFAR-10-LT (ρ=100) | Error Rate | 17.6 | VS + SAM |
| Few-Shot Image Classification | CIFAR-10-LT (ρ=200) | Error Rate | 21.9 | LDAM + DRW + SAM |
| Generalized Few-Shot Classification | CIFAR-100-LT (ρ=200) | Error Rate | 52 | PaCo + SAM |
| Generalized Few-Shot Classification | CIFAR-10-LT (ρ=10) | Error Rate | 10.6 | LDAM + DRW + SAM |
| Generalized Few-Shot Classification | iNaturalist 2018 | Top-1 Accuracy | 70.1 | LDAM + DRW + SAM |
| Generalized Few-Shot Classification | CIFAR-100-LT (ρ=50) | Error Rate | 34.72 | GLMC + SAM |
| Generalized Few-Shot Classification | ImageNet-LT | Top-1 Accuracy | 53.1 | LDAM + DRW + SAM |
| Generalized Few-Shot Classification | CIFAR-10-LT (ρ=50) | Error Rate | 8.44 | GLMC + SAM |
| Generalized Few-Shot Classification | CIFAR-100-LT (ρ=100) | Error Rate | 40.99 | GLMC + SAM |
| Generalized Few-Shot Classification | CIFAR-100-LT (ρ=100) | Error Rate | 47 | PaCo + SAM |
| Generalized Few-Shot Classification | CIFAR-100-LT (ρ=100) | Error Rate | 53.4 | VS + SAM |
| Generalized Few-Shot Classification | CIFAR-10-LT (ρ=100) | Error Rate | 10.82 | GLMC + SAM |
| Generalized Few-Shot Classification | CIFAR-10-LT (ρ=100) | Error Rate | 17.6 | VS + SAM |
| Generalized Few-Shot Classification | CIFAR-10-LT (ρ=200) | Error Rate | 21.9 | LDAM + DRW + SAM |
| Long-tail Learning | CIFAR-100-LT (ρ=200) | Error Rate | 52 | PaCo + SAM |
| Long-tail Learning | CIFAR-10-LT (ρ=10) | Error Rate | 10.6 | LDAM + DRW + SAM |
| Long-tail Learning | iNaturalist 2018 | Top-1 Accuracy | 70.1 | LDAM + DRW + SAM |
| Long-tail Learning | CIFAR-100-LT (ρ=50) | Error Rate | 34.72 | GLMC + SAM |
| Long-tail Learning | ImageNet-LT | Top-1 Accuracy | 53.1 | LDAM + DRW + SAM |
| Long-tail Learning | CIFAR-10-LT (ρ=50) | Error Rate | 8.44 | GLMC + SAM |
| Long-tail Learning | CIFAR-100-LT (ρ=100) | Error Rate | 40.99 | GLMC + SAM |
| Long-tail Learning | CIFAR-100-LT (ρ=100) | Error Rate | 47 | PaCo + SAM |
| Long-tail Learning | CIFAR-100-LT (ρ=100) | Error Rate | 53.4 | VS + SAM |
| Long-tail Learning | CIFAR-10-LT (ρ=100) | Error Rate | 10.82 | GLMC + SAM |
| Long-tail Learning | CIFAR-10-LT (ρ=100) | Error Rate | 17.6 | VS + SAM |
| Long-tail Learning | CIFAR-10-LT (ρ=200) | Error Rate | 21.9 | LDAM + DRW + SAM |
| Generalized Few-Shot Learning | CIFAR-100-LT (ρ=200) | Error Rate | 52 | PaCo + SAM |
| Generalized Few-Shot Learning | CIFAR-10-LT (ρ=10) | Error Rate | 10.6 | LDAM + DRW + SAM |
| Generalized Few-Shot Learning | iNaturalist 2018 | Top-1 Accuracy | 70.1 | LDAM + DRW + SAM |
| Generalized Few-Shot Learning | CIFAR-100-LT (ρ=50) | Error Rate | 34.72 | GLMC + SAM |
| Generalized Few-Shot Learning | ImageNet-LT | Top-1 Accuracy | 53.1 | LDAM + DRW + SAM |
| Generalized Few-Shot Learning | CIFAR-10-LT (ρ=50) | Error Rate | 8.44 | GLMC + SAM |
| Generalized Few-Shot Learning | CIFAR-100-LT (ρ=100) | Error Rate | 40.99 | GLMC + SAM |
| Generalized Few-Shot Learning | CIFAR-100-LT (ρ=100) | Error Rate | 47 | PaCo + SAM |
| Generalized Few-Shot Learning | CIFAR-100-LT (ρ=100) | Error Rate | 53.4 | VS + SAM |
| Generalized Few-Shot Learning | CIFAR-10-LT (ρ=100) | Error Rate | 10.82 | GLMC + SAM |
| Generalized Few-Shot Learning | CIFAR-10-LT (ρ=100) | Error Rate | 17.6 | VS + SAM |
| Generalized Few-Shot Learning | CIFAR-10-LT (ρ=200) | Error Rate | 21.9 | LDAM + DRW + SAM |