Introduction
Hierarchical Multi-Label Text Classification (HMTC) involves assigning documents to multiple categories within a structured taxonomy. For instance, a product review for "baby cereal" should ideally be tagged with Baby Products, Feeding, and Baby Food. Traditional supervised learning methods for HMTC require massive amounts of human-labeled data, which is often prohibitively expensive or unavailable for specialized domains.
TaxoClass is a novel framework designed to perform HMTC using only class names as supervision. By leveraging pre-trained language models and graph neural networks, it bridges the gap between zero-shot classification and fully supervised performance.
The TaxoClass Methodology
The TaxoClass pipeline consists of four primary stages designed to extract and refine hierarchical labels without manual annotation.
1. Document-Class Similarity via NLI
Instead of relying on exact keyword matches, TaxoClass utilizes a pre-trained Natural Language Inference (NLI) model (e.g., RoBERTa-Large-MNLI). The document is treated as a "premise," and the class name is embedded into a template like "this document is about [class]" to serve as a "hypothesis." This approach allows the model to capture semantic relationships even when the specific class name does not appear in the text.
2. Core Class Mining
A key innovation of TaxoClass is the concept of "core classes." Humans typically identify the most specific relevant category first and then infer parent categories. TaxoClass mimics this by performing a top-down search to identify candidate classes.
Classes are filtered using a confidence score that ensures a selected class is significantly more relevant than its siblings and parent, and stands out relative to the general corpus.
3. Taxonomy-Enhanced Classifier and Self-Training
The identified core classes act as pseudo-labels to train a dual-encoder model. A BERT encoder processes the document text, while a Graph Neural Network (GNN) encoder processes the taxonomy. This ensures that a class's representation is contextually informed by its position in the hierarchy.
Finally, the model undergoes multi-label self-training on the entire unlabeled corpus, iteratively refining its predictions based on high-confidence outputs.
Experimental Results
TaxoClass was evaluated on two large-scale datasets:
- Amazon-531: ~49,000 product reviews across 531 classes.
- DBPedia-298: ~245,000 Wikipedia snippets across 298 classes.
Key Performance Metrics
TaxoClass achieved an Example-F1 score of 0.593 on Amazon-531 and 0.815 on DBPedia-298, outperforming previous weakly-supervised methods by approximately 25%. Notably, on the Amazon dataset, TaxoClass performed comparably to a supervised fastText model trained on 20,000 human-annotated documents (70% of the labeled data), despite using zero manual labels.
Discussion and Future Work
The success of TaxoClass highlights the power of NLI as a zero-shot bridge and the importance of structural context provided by GNNs. By focusing on "core classes," the model can effectively recover the full hierarchical path.
However, the framework relies on descriptive class names. Ambiguous or coded taxonomies may hinder the initial similarity calculation. Future research could explore semi-supervised integrations—combining class names with a small set of human labels—or extending the method to more complex structures like general knowledge graphs.
Summary updated