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

Improving Detection of Rare Nodes in Hierarchical Multi-Label Learning

Isaac Xu, Martin Gillis, Ayushi Sharma, Benjamin Misiuk, Craig J. Brown, Thomas Trappenberg

TL;DR

Hierarchical multi-label classification models often fail to predict specific, fine-grained categories deep within a hierarchy due to severe class imbalance. This paper introduces a novel node-based loss function that combines node-wise imbalance weighting with ensemble-based uncertainty (focal weighting) to dramatically improve the detection of rare nodes. The approach boosts recall by up to five times and significantly improves $F_1$ scores, especially in data-scarce or noisy environments.

What Problem Does This Paper Address?

In fields like marine biology (seafloor habitat classification) or medicine (gene function annotation), data is naturally structured hierarchically (e.g., Animal $\rightarrow$ Echinoderm $\rightarrow$ Sea Urchin). Models operating in these domains must predict multiple labels at varying depths simultaneously.

However, deep "child" nodes are naturally rare compared to their "parent" nodes. Standard methods try to fix this via data resampling. But because hierarchical labels are conjoined (a Sea Urchin is always an Echinoderm and an Animal), resampling an observation containing a rare child node inevitably overemphasizes the already common parent nodes. This causes models to play it safe, frequently predicting broad, high-level categories while ignoring the crucial, fine-grained details deeper in the tree.

Methods

The authors propose a node-centric loss function ($L_{\text{focal}}$) built on top of the Coherent Hierarchical Multi-Label Classification Neural Network (C-HMCNN) framework. Their approach abandons traditional observation-based resampling in favor of a two-branched weighting strategy:

  1. Node-wise Imbalance Weighting: Instead of weighting entire data points, the authors weight individual nodes based on their independent frequency in the dataset. They introduce a smoothing parameter ($\tilde{w}_0$) to ensure common nodes still contribute informative gradients during training without being completely drowned out by rare ones.
  2. Uncertainty-based Focal Weighting: Inspired by focal loss, this component dynamically shifts the model's focus toward challenging nodes where the model is highly uncertain. The authors leverage an ensemble of models to robustly quantify uncertainty, testing four different metrics. The best performers were the binary Bayesian Model Average (bBMA) and Gated Margin Uncertainty (GMU). Crucially, this uncertainty weighting is computed without gradients to prevent the ensemble from collapsing during training.
Mathematical definitions of the components used in the proposed loss function.

Datasets

The authors evaluated their approach across several distinct data modalities:

  • Gene Product Datasets: 16 benchmark datasets split between the Functional Catalogue (FUN) framework (a tree-like structure) and the Gene Ontology (GO) framework (a Directed Acyclic Graph/DAG structure).
  • BenthicNet-E: A subset of the BenthicNet image dataset focusing on Echinodermata, containing 13 nodes up to a depth of two.
  • Enron: A text-based email classification dataset containing 56 nodes.
  • Diatom: A processed image dataset for unicellular micro-algae containing 398 nodes.

Key Insights and Ideas

  • Node-based > Observation-based: Shifting the focus from resampling data points to weighting individual nodes breaks the vicious cycle where fixing rare child node imbalance accidentally worsens parent node dominance.
  • The Counterintuitive Recall Trade-off: Lowering the loss weight for common parent nodes actually improves their recall. Because of the hierarchical constraint, the model learns to identify these common high-level nodes indirectly by getting better at recognizing their specific, rare descendants.
  • Total Uncertainty Beats Pure Epistemic Uncertainty: Surprisingly, metrics capturing total uncertainty (like bBMA and GMU) outperformed pure epistemic (model) uncertainty. In well-trained networks, aleatoric (data) noise can dominate, and ignoring it limits the focal component's impact.
  • Synergy with Resampling: The authors found that combining their node-weighted loss with a traditional multi-label resampling method (LPROS) yielded synergistic benefits, boosting both precision and recall by allowing the model to predict previously unpredicted nodes.

Key Results

  • Massive Recall Boosts: On the FUN gene datasets, the proposed node-weighting scheme improved recall by up to a factor of five compared to the unweighted baseline.
  • Robust $F_1$ Improvements: Incorporating focal weighting via bBMA or GMU consistently provided statistically significant gains in $F_1$ scores across the benchmark datasets.
  • Aiding Weak Encoders: In vision tasks (BenthicNet-E), the method showed the most dramatic advantages when the image encoder was suboptimal or untrained, effectively acting as a buffer against noise and limited training data.
Overview of the HML rare node problem and the proposed two-branch (imbalance + focal) weighting approach.

Limitations and Future Work

  • Computer Vision Anomalies: While combining the node-weighted loss with LPROS resampling worked wonders for gene and text data, it did not perform well on the BenthicNet-E image dataset. The authors note that computer-vision-specific factors like data augmentation and architecture choices need further exploration.
  • Computational Overhead: Quantifying uncertainty via full model ensembles is computationally expensive. Although the authors successfully experimented with a faster Monte Carlo dropout alternative (reducing training time by ~68%), it resulted in a slight drop in $F_1$ performance compared to the full ensemble.

Summary updated

BibTeX
@article{xu2026improving,
  author = {Isaac Xu and Martin Gillis and Ayushi Sharma and Benjamin Misiuk and Craig J. Brown and Thomas Trappenberg},
  title = {{Improving Detection of Rare Nodes in Hierarchical Multi-Label Learning}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure