Abstract
In many high-stakes classification tasks, such as autonomous driving or medical diagnosis, the recall of specific critical classes is often more important than overall accuracy. Traditional methods like threshold tuning or Weighted Cross-Entropy (WCE) typically improve recall at the expense of general performance. This paper introduces Class-sensitive Additive Angular Margin (CAMRI) Loss, which applies an additive angular margin specifically to a target class. By geometrically compacting the feature space of the priority class, CAMRI increases its separation from others. Empirical evaluations on CIFAR-10, GTSRB, and AwA2 demonstrate that CAMRI significantly boosts target class recall without degrading overall model accuracy.
Introduction
Standard multiclass classification models usually treat every class as equally important. However, in real-world scenarios, misidentifying a "Stop" sign as another sign can have fatal consequences. When a model needs to be extra sensitive to a specific class, practitioners often turn to threshold tuning or Weighted Cross-Entropy (WCE). Threshold tuning is a zero-sum game where increasing recall for one class almost always reduces the accuracy of others. WCE, while helpful, simply shifts the decision boundary without making the underlying features more distinct.
Methods: The Geometry of CAMRI Loss
CAMRI Loss builds upon angular margin losses, such as ArcFace, which are widely used in face recognition. These methods evaluate the angle between a data point's feature vector and the "ideal" vector for that class.
The core innovation of CAMRI is applying an additive angular margin only to the important class. Geometrically, this forces the neural network to map examples of the target class into a much tighter, more compact "cone" in the feature space. This increased intraclass compactness naturally creates a larger margin between the target class and all other classes. Unlike WCE, which "shifts a fence" and risks encroaching on neighbors, CAMRI "shrinks the house," gaining safety margin without sacrificing the representational capacity of other classes.
Experimental Results
The researchers evaluated CAMRI Loss across three benchmarks: CIFAR-10, the German Traffic Sign Recognition Benchmark (GTSRB), and Animals with Attributes 2 (AwA2).
Key Findings
- GTSRB: Targeting the second-worst performing class, CAMRI improved recall by 9% compared to standard Cross-Entropy, with no loss in overall accuracy.
- Superiority over WCE: In the majority of experimental cases, CAMRI achieved higher recall improvements than WCE while maintaining equivalent accuracy levels.
- Class Difficulty: The benefits of CAMRI are most pronounced when the baseline recall is low. If a class is inherently difficult or confusing, the margin helps significantly more than for classes that are already easy to learn.
Discussion and Limitations
While CAMRI is a powerful tool for the final layer of a network, some limitations remain. In the AwA2 dataset, certain classes like "mouse" remained difficult to improve due to inherent image quality issues (small, blurry subjects) rather than the loss function itself. Additionally, CAMRI requires tuning hyperparameters such as the margin ($m$) and temperature scale ($s$). Future work may explore how to design feature representations in deeper layers of the network to achieve even better separation.
Conclusion
CAMRI Loss provides a robust framework for prioritizing specific classes in multiclass classification. By focusing on intraclass compactness for target classes, it breaks the traditional trade-off between specific recall and overall accuracy, making it an ideal candidate for safety-critical machine learning applications.
Summary updated