NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hierarchical classification at multiple operating points

Jack Valmadre

Abstract

This paper introduces an efficient algorithm to evaluate hierarchical classifiers across their entire range of "specificity vs. correctness" trade-offs, rather than just at a single prediction point. The authors discover that simple "flat" classifiers often outperform complex top-down models, but introduce a new soft-max-margin loss that sets a new state-of-the-art for hierarchical tasks.

Introduction

In standard classification, models are usually forced to pick a specific "leaf" label (e.g., "Golden Retriever"). However, in many real-world scenarios—like medical diagnosis or species identification—it is often better to be "correct but vague" (e.g., "It's a dog") than "specific but wrong."

This creates an inherent trade-off between specificity (how detailed the prediction is) and correctness (how likely it is to be right). While precision-recall curves are standard for evaluating object detectors, hierarchical classifiers are typically evaluated at a single "operating point" (one fixed threshold). This makes it impossible to see how a model performs across different levels of caution. Furthermore, existing "top-down" models that follow the tree structure often perform surprisingly poorly compared to simple models that ignore the hierarchy during training.

Methodology

The paper contributes to the field of hierarchical classification in three main areas:

  1. Evaluation Framework: The authors propose an efficient algorithm to generate operating characteristic curves. It identifies the "Pareto set" of predictions—labels that are both more confident and more informative than others—and merges these across a dataset to visualize the full trade-off between specificity (measured by information content) and correctness.
  2. New Loss Functions:
    • Soft-max-margin: A differentiable version of the structured hinge loss. It encourages the model to maintain a "margin" between the correct class and incorrect ones, where the margin size is determined by how far apart the classes are in the hierarchy.
  3. Soft-max-descendant: A loss that tries to classify every ancestor of a label correctly against all "incorrect" sub-trees. (This was included as a "negative result" as it proved ineffective).
  4. PS Softmax: An ablation of the "Deep RTC" method, which uses parameter sharing to calculate scores but applies a standard softmax at the end, ensuring the probabilities across the hierarchy are mathematically consistent.

These methods were evaluated on two major benchmarks: iNat21-Mini (a challenging dataset of 10,000 biological species organized into a seven-level taxonomy) and ImageNet-1k (using its underlying WordNet hierarchy).

Key Insights

One of the most surprising findings is that a "naïve" flat softmax classifier (trained only on leaf nodes) dominates most sophisticated top-down hierarchical models across the entire operating range.

Operating characteristic curves comparing hierarchical classification methods.

The authors hypothesize that top-down models struggle because coarse classes (like "Bird") are highly diverse. It is easier for a model to learn a "Bird" by learning the union of many specific bird species (bottom-up) than by trying to learn a single "Bird" classifier at a high level (top-down).

However, top-down models are not without merit. While they underperform on known classes, they are much more robust when encountering unseen classes (out-of-distribution). If a model sees a species it wasn't trained on, a top-down model is more likely to correctly identify its genus or family than a flat model.

Finally, by incorporating the hierarchy into the loss function via a margin (Soft-max-margin), the model can finally beat the flat softmax baseline, particularly in the high-precision regime.

Results

On the iNat21 dataset, the proposed PS Softmax and Soft-max-margin achieved the best overall results.

Performance metrics on the iNat21 dataset showing PS Softmax and Soft-max-margin outperforming baselines.

As shown in the performance table, PS Softmax reached an Average Precision (AP) of 68.90%, significantly outperforming the flat softmax baseline of 66.90%. The Soft-max-margin loss was found to be the most effective at high precision, while PS Softmax performed best at high recall. Conversely, traditional top-down methods like "Conditional Softmax" performed significantly worse, often trailing the baseline by 5-10% across various accuracy metrics.

Limitations and Future Work

  • Manual Margin Design: The Soft-max-margin loss requires manual tuning of the margin parameter, which might vary between different hierarchies.
  • Scaling Issues: The current approach uses a fully-connected prediction layer. This may not scale well to "extreme" classification problems involving millions of classes, where embedding-based or metric-learning approaches might be necessary.
  • DAGs vs. Trees: The current work focuses on tree-structured hierarchies. Extending these efficient evaluation curves to Directed Acyclic Graphs (DAGs)—where a class can have multiple parents—remains an open challenge.

Summary updated

BibTeX
@inproceedings{valmadre2022hierarchical,
  author = {Jack Valmadre},
  title = {{Hierarchical classification at multiple operating points}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=mNtFhoNRr4i},
}
Figure