Hierarchical Multi-Label Classification Networks

Jonatas Wehrmann, Ricardo Cerri, Rodrigo C. Barros

TL;DR

The authors introduce HMCN, a novel neural network architecture that masters hierarchical multi-label classification by simultaneously optimizing for local (level-specific) and global (entire hierarchy) relationships. By combining feed-forward or recurrent structures with a unique hierarchical violation penalty, HMCN sets a new state-of-the-art across 21 diverse datasets in bioinformatics, text, and image annotation.

What Problem Does This Paper Address?

In standard classification, we usually assume classes are disjoint (e.g., is this a cat or a dog?). However, real-world data is often organized into hierarchies. Hierarchical Multi-Label Classification (HMC) deals with cases where an object belongs to multiple paths in a tree or a Directed Acyclic Graph (DAG). For example, a protein might perform multiple functions at different levels of a biological taxonomy.

Existing HMC methods typically fall into two camps:

  1. Local Approaches: They train separate classifiers for different parts of the hierarchy. While they capture local nuances, they are computationally expensive and suffer from "error propagation" (a mistake at the top level ruins everything below).
  2. Global Approaches: They use one single model for the whole hierarchy. These are cheaper but often "underfit," failing to capture the specific relationships within local branches.

The authors tackle the challenge of creating a model that captures both local and global information without the typical downsides of either.

Methods

The paper proposes two versions of the Hierarchical Multi-Label Classification Network (HMCN):

  • HMCN-F (Feed-forward): This architecture features a "main flow" of fully-connected layers. Crucially, it has multiple outputs: one for every hierarchical level (local) and one for the entire hierarchy (global). These are eventually combined for a final consensual prediction.
HMCN-F Architecture
  • HMCN-R (Recurrent): To handle very deep hierarchies without a massive explosion in parameters, the authors modeled the levels as "time steps" in a recurrent structure based on LSTMs. This allows the model to share weights across levels while treating the hierarchy as a sequential discovery process.
HMCN-R Architecture

Key Technical Innovations: * Input Reuse: In both models, the original input features are re-fed into every layer. This ensures that the "specialist" layers at deeper levels don't lose sight of the raw data. * Hybrid Loss Function: The model minimizes a combined loss of local level-wise predictions and the global hierarchy prediction. * Hierarchical Violation Penalty: A specific mathematical penalty is added to the training process to punish the model if it predicts a higher probability for a child node than for its parent—a logical impossibility in a hierarchy.

Datasets

The researchers evaluated HMCN on 21 datasets across four distinct domains to prove its versatility:

  • Bioinformatics: Protein function prediction using the FunCat (tree-structured) and Gene Ontology (DAG-structured) taxonomies.
  • Text Classification: The Enron email corpus and the Reuters news dataset.
  • Image Annotation: Medical and microalgae image datasets (IMCLEF07A/D and Diatoms).

Key Insights and Ideas

  • The Power of "And": The biggest "aha" moment is that you don't have to choose between local and global learning. By forcing the network to solve both tasks simultaneously, the local layers act as a regularizer for the global flow, providing a stronger gradient signal during training.
  • Hierarchy as a Sequence: Treating a static hierarchy as a sequence (in HMCN-R) is a clever way to achieve parameter efficiency. It allows the model to scale to taxonomies with thousands of classes while keeping the model size manageable (e.g., 3M parameters vs. 7M in the feed-forward version).
  • Logical Consistency via Loss: Instead of just "fixing" predictions after the fact, incorporating the hierarchical violation penalty directly into the loss function forces the network to learn the underlying logic of the taxonomy.

Key Results

HMCN significantly outperformed current state-of-the-art methods (like Clus-HMC and CSSA):

  • Average Ranking: On a scale where lower is better, HMCN-F achieved an average rank of 1.07 across all 21 datasets, meaning it was the top performer in almost every single test.
  • Robustness: It was the first method in the literature to outperform the ensemble-based Clus-HMC-Ens across all FunCat and Gene Ontology datasets.
  • Efficiency: HMCN-R provided a "best of both worlds" scenario, offering high performance with a significantly smaller memory footprint than the feed-forward version, making it ideal for very large-scale problems.

Limitations and Future Work

  • Training Stability: The authors noted that the recurrent version (HMCN-R) could be unstable during training, requiring careful gradient clipping to prevent "exploding gradients."
  • Hyper-parameter Sensitivity: While they used a default trade-off ($\beta = 0.5$) between local and global importance, they suggest that tuning this per dataset could yield even better results.
  • End-to-End Vision: The current work uses pre-extracted features for images. A logical next step is to integrate HMCN with Convolutional Neural Networks (CNNs) to perform hierarchical classification directly from raw pixels.

Summary updated

BibTeX
@inproceedings{wehrmann2018hierarchical,
  author = {Jonatas Wehrmann and Ricardo Cerri and Rodrigo C. Barros},
  title = {{Hierarchical Multi-Label Classification Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
}
Figure