Leveraging Angular Information Between Feature and Classifier for Long-tailed Learning: A Prediction Reformulation Approach

Haoxuan Wang, Junchi YanarXiv 2022

TL;DR

This paper introduces a novel approach to tackle the long-tailed recognition problem by reformulating the classifier's prediction mechanism. Instead of relying on traditional linear predictions, they leverage the angles between feature vectors and classifier weights, demonstrating improved performance, especially for tail classes, without requiring pre-training.

What Problem Does This Paper Address?

Deep neural networks often struggle with "long-tailed" datasets, where a few classes (head classes) have abundant data, while many others (tail classes) have very few samples. This imbalance leads to a corresponding imbalance in the learned model parameters, particularly in the classifier's weights, where head classes tend to have much larger weight norms. This phenomenon exacerbates the poor performance on tail classes. Existing methods often try to re-balance the data or the classifier weights, but this paper proposes a different strategy: reformulating the prediction itself to be less sensitive to weight imbalances.

Methods

The core of the proposed method is a prediction reformulation that replaces the standard linear prediction (dot product between feature vector $\phi(x)$ and classifier weight $W_c$) with an angular prediction. This new prediction is based on the angle between $\phi(x)$ and $W_c$, calculated using the arccosine of their normalized dot product:

$P_c^A = \arccos\left(\frac{\phi(x) \cdot W_c}{||\phi(x)||\cdot||W_c||}\right)$

This angular formulation inherently normalizes both the feature and weight vectors, making the prediction less dependent on the magnitude of the classifier weights.

The authors then integrate this angular prediction into a two-stage learning framework, a common and effective approach for long-tailed recognition. They propose several novel modules:

  • Linear to Angular (L2A): Simply replacing the linear prediction with the angular prediction in the testing phase.
  • Angular Entropy Minimization (AEM): Used in the first stage of training to encourage a more uniform distribution of probabilities, mitigating the "over-pessimistic" nature of angular predictions.
  • Active Label-Aware Smoothing (ALAS): Used in the second stage, this module leverages batch-level angular predictions to dynamically adjust smoothing factors, improving tail class learning.
  • Angle-based Two-stage Learning (ATL): The full framework combining AEM and ALAS.
  • Angular Bias-directed Smoothing (ABS): A post-hoc re-weighting method to address the "implicit bias" observed in angular predictions.

Datasets

The paper evaluates its methods on the following long-tailed datasets:

  • CIFAR10-LT
  • CIFAR100-LT
  • ImageNet-LT

These datasets are created by sampling from their balanced counterparts (CIFAR10, CIFAR100, ImageNet) using an exponential distribution to simulate long-tailed class distributions with varying imbalance ratios ($\beta$).

Key Insights and Ideas

  • Weight Imbalance is Real and Problematic: The paper empirically confirms that classifier weights are indeed imbalanced in long-tailed settings, with head classes having significantly larger norms. This imbalance is a key driver of poor tail class performance.
  • Angles as a Robust Predictor: Reformulating predictions based on angles, rather than raw dot products, proves to be a more robust approach, especially when classifier weights are imbalanced. This is because angles are invariant to the magnitude of the vectors.
  • Angular Smoothness: Angular predictions exhibit a "smoother" distribution compared to linear predictions. While this can lead to over-pessimism, it also offers opportunities for novel smoothing techniques like ALAS.
  • Implicit Bias in Angular Predictions: Angular predictions, while beneficial, can exhibit an "implicit bias" where predictions are not perfectly calibrated. The ABS method effectively addresses this.
  • ViT and Angular Information: The paper explores the application of angular information to Vision Transformers (ViTs). Interestingly, ViTs do not exhibit the same classifier weight imbalance as CNNs, suggesting that feature quality and quantity are still crucial for long-tailed recognition even with different architectures.

Key Results

  • State-of-the-Art Performance: The proposed ATL method achieves the best performance among peer methods without pretraining on CIFAR10-LT, CIFAR100-LT, and ImageNet-LT.
  • Competitive with Pretrained Methods: The performance is also competitive with contrastive methods that do use pretraining.
  • Improved Tail Class Accuracy: The angular prediction reformulation significantly boosts performance, particularly for the tail classes, which is the primary challenge in long-tailed recognition.
  • Parameter Efficiency: L2A allows for the removal of the learnable weight scaling module in the second stage, saving parameters.
  • Effective Data Pruning: The angular hardness metric (AVH) is shown to be a superior metric for data pruning compared to EL2N, allowing for significant data reduction with minimal performance loss.

Limitations and Future Work

  • Over-Pessimism: Angular predictions can be "over-pessimistic," leading to a close-to-uniform distribution of predicted logits. The proposed AEM and ABS methods aim to mitigate this.
  • Trade-off in ABS: The ABS method involves a trade-off between head and tail class accuracy, controlled by a hyperparameter 's'.
  • ViT Performance: While angular prediction works with ViTs, it doesn't necessarily lead to significant improvements over linear prediction, suggesting that the benefits of angular information might be more pronounced in architectures with pronounced classifier weight imbalance.
  • Future Work: The authors suggest further exploring the application of angular information to other areas like data pruning and vision transformers, and investigating the natural relationship between angular information and long-tailed recognition. They also hint at further analysis of the two-stage training process and its impact on classifier weights.

Summary updated

BibTeX
@misc{wang2022leveraging,
  author = {Haoxuan Wang and Junchi Yan},
  title = {{Leveraging Angular Information Between Feature and Classifier for Long-tailed Learning: A Prediction Reformulation Approach}},
  year = {2022},
  eprint = {2212.01565},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.01565},
}
Figure