Abstract
Attempts of learning from hierarchical taxonomies in computer vision have been mostly focusing on image classification. Though ways of best harvesting learning improvements from hierarchies in classification are far from being solved, there is a need to target these problems in other vision tasks such as object detection. As progress on the classification side is often dependent on hierarchical cross-entropy losses, novel detection architectures using sigmoid as an output function instead of softmax cannot easily apply these advances, requiring novel methods in detection. In this work we establish a theoretical framework based on probability and set theory for extracting parent predictions and a hierarchical loss that can be used across tasks, showing results across classification and detection benchmarks and opening up the possibility of hierarchical learning for sigmoid-based detection architectures.
Introduction
In standard computer vision tasks, objects are typically treated as a flat set of independent labels. However, real-world objects exist within rich semantic hierarchies—for instance, a "Golden Retriever" is a "Dog," which is a "Mammal." While hierarchical learning has been explored for image classification, its application to object detection has lagged behind.
A primary hurdle is technical: most hierarchical methods rely on Softmax functions, which assume classes are mutually exclusive. In contrast, modern high-performance object detectors like RetinaNet utilize Sigmoid functions and Focal Loss, treating classes independently. Until now, there has been no mathematically sound framework to aggregate these independent sigmoid probabilities up a hierarchy. This paper addresses this gap by introducing a unified framework based on probability and set theory that works across both classification and detection.
Methodology
The authors propose a framework that enables hierarchical supervision for sigmoid-based architectures through two main innovations:
1. Sigmoid Hierarchy Aggregation
Unlike Softmax, where parent probabilities can be calculated by simply summing child probabilities, Sigmoid outputs are not mutually exclusive. The authors treat the occurrence of a parent class as the union of its children. To calculate this correctly from independent sigmoid outputs, they employ the Inclusion-Exclusion Principle. Interestingly, they show that the traditional "summation" method used in hierarchical softmax is actually a special case of their union-based framework where the intersection between classes is assumed to be zero.
2. Multi-level Hierarchical Loss
The framework defines a total loss as a weighted sum of losses at every level of the hierarchy. This allows the model to receive supervision not just for the specific leaf label (e.g., "Car"), but also for all its ancestors (e.g., "Vehicle"). This multi-level approach encourages the model to learn the semantic proximity of different categories.
3. Hierarchical Evaluation for Detection
To properly evaluate detection performance, the authors introduce a multi-level mAP (mean Average Precision). A key component of this evaluation is re-running Non-Maximum Suppression (NMS) at each level of the hierarchy. This allows the model to "correct" a wrong leaf-level prediction if the joint probability of its siblings points toward the correct parent during post-processing.
Key Results
The framework was validated on the COCO object detection benchmark (enriched with WordNet hierarchies) and the iNaturalist fine-grained classification dataset.
Object Detection Performance
On COCO, the method consistently improved mAP across various backbones and training schedules. For a RetinaNet model using a ResNet-50 backbone, leaf-level mAP improved from 37.30 to 37.44, with even more significant gains observed at higher levels of the hierarchy. These results demonstrate that hierarchical supervision helps the model generalize better across semantic levels.
Classification Performance
On the iNaturalist dataset, the authors' "Hierarchical Cross-Entropy" (HXE) formulation outperformed previous state-of-the-art hierarchical methods. Their leaf-focused weighting achieved a Top-1 error of 44.55%, significantly better than the standard cross-entropy baseline (46.60%) and prior hierarchical approaches (47.27%).
Insights and Discussion
- Making "Better" Mistakes: By training with hierarchical loss, models learn semantic relationships. Even when the model misses the exact leaf label, it is far more likely to predict a related category rather than an unrelated one.
- The Power of Level Weighting: The balance between leaf-level and parent-level loss serves as a performance "knob." Leaf-focused weighting tends to improve raw accuracy, while hierarchy-focused weighting significantly reduces the severity of errors by prioritizing correct ancestor predictions.
- Error Analysis: Using TIDE analysis, the authors confirmed that their hierarchical loss specifically reduces classification errors across all levels of the tree without degrading localization performance. This suggests the improvements are purely semantic.
Conclusion
This work establishes a robust theoretical foundation for hierarchical learning in sigmoid-based architectures, bridging a critical gap in object detection. By enabling models to leverage the inherent structure of class taxonomies, the authors show that we can achieve both higher accuracy and more semantically sensible errors. Future work may focus on even more fine-grained datasets where class confusion is the primary bottleneck for performance.
Summary updated