Abstract: Hierarchical text classification (HTC) is the task of assigning labels to a text within a structured space organized as a hierarchy. Recent works treat HTC as a conventional multilabel classification problem, therefore evaluating it as such. We instead propose to evaluate models based on specifically designed hierarchical metrics and we demonstrate the intricacy of metric choice and prediction inference method. We introduce a new challenging dataset and we evaluate recent sophisticated models against a range of simple but strong baselines, including a new theoretically motivated loss. Finally, we show that those baselines are very often competitive with the latest models. This highlights the importance of carefully considering the evaluation methodology when proposing new methods for HTC.
Introduction
Hierarchical Text Classification (HTC) involves assigning labels to text within a structured taxonomy, such as classifying a news article under Sports → Football → Premier League. Unlike standard classification, the labels have inherent parent-child relationships that define the semantic structure of the data.
Despite the structural nature of the task, the authors identify a major gap in current research: most studies treat HTC as a standard multi-label problem, ignoring the hierarchy during evaluation and inference. This leads to three primary issues:
- Suboptimal Evaluation: Standard Micro/Macro F1 scores with fixed 0.5 probability thresholds ignore the "severity" of errors (e.g., misclassifying a Golden Retriever as a Labrador vs. a Toaster).
- Inference Neglect: There is little focus on picking label sets that respect the hierarchy's logical constraints.
- Overly Simple Benchmarks: Existing datasets are often shallow or balanced, failing to reflect the long-tailed nature of real-world taxonomies.
Methodology
The paper proposes a "back-to-basics" approach combined with more rigorous evaluation techniques:
Hierarchical Metrics
The authors advocate for the hF1-score, which accounts for ancestor overlap between predicted and ground-truth labels. To avoid the bias of arbitrary thresholds, they evaluate using the Area Under the Curve (AUC) of the precision-recall curve for hF1.
Conditional Softmax Cross-Entropy
Instead of treating every label as an independent binary choice, the authors model the probability of a child node given its parent. This naturally enforces "coherence"—a model cannot predict a leaf node without its ancestors. To tackle the "long-tail" problem where some labels have very few examples, they introduce a Logit-Adjusted version of the conditional softmax, shifting decision boundaries to be more sensitive to rare, deep-level classes.
The Hierarchical WikiVitals (HWV) Dataset
To test these methods, the authors introduce Hierarchical WikiVitals (HWV), derived from abstracts of "vital" Wikipedia articles. Unlike previous benchmarks, HWV features a deep hierarchy (up to 6 levels) and is highly imbalanced; approximately 50% of the labels have fewer than 10 instances. This makes it a significantly more realistic and difficult test for HTC models.
Key Insights and Results
One of the most striking findings is that complexity does not always equate to better performance. On the challenging HWV dataset, complex "hierarchy-aware" models like HiTIN failed to beat simple baselines.
Depth and Performance
The performance gap between simple and complex models often widens as classification moves deeper into the tree. Simple conditional models prove significantly more robust at classifying specific, deep-level nodes than their sophisticated counterparts.
Summary of Results
- HWV Performance: The Logit-Adjusted Conditional Softmax achieved the best results on HWV (90.97% hF1 AUC), outperforming HiTIN (90.72%) and standard BCE (89.23%).
- WOS Surprise: On the popular Web-of-Science (WOS) dataset, a simple BERT + BCE model (using no hierarchy information) was among the top performers, suggesting current benchmarks may be "solved" by simple models, masking the need for hierarchical innovation.
- Robustness to Imbalance: Logit-adjustment proved vital for HWV, showing clear improvements in Macro F1 scores for under-represented classes in the "long tail."
Conclusion
This research highlights the importance of evaluation methodology in HTC. By moving to AUC-based hierarchical metrics and utilizing theoretically motivated conditional losses, the authors demonstrate that simple baselines are often more competitive and robust than the latest state-of-the-art models. Future work should focus on extending these insights to Directed Acyclic Graphs (DAGs) and developing more sophisticated, statistically grounded inference rules.
Summary updated