Introduction
In traditional multi-class classification, labels are typically treated as independent, "flat" entities. This approach ignores the inherent semantic relationships between classes—for example, the fact that a "Golden Retriever" is more closely related to a "Labrador" than to a "Toaster." This oversight leads to significant challenges, including the "long-tail" problem, where models struggle to learn from rare classes, and "shallow" curve fitting, where models fail to generalize beyond specific statistical patterns in the training data.
To address these issues, researchers from Lenovo AI Lab developed TaxoKnow, a framework that integrates hierarchical label taxonomies directly into the neural network's loss function. By treating taxonomy as prior knowledge, TaxoKnow encourages models to understand the "family tree" of labels, leading to improved accuracy and robustness, particularly in data-scarce and semi-supervised environments.
Methodology
TaxoKnow introduces two distinct "Neuro-Symbolic" strategies to incorporate structural knowledge into the learning process: a symbolic approach based on logic and a geometric approach based on graph convolutions.
1. The Symbolic-based Approach
The symbolic method treats the taxonomy as a set of Boolean logic constraints. Under this paradigm, if a sample is classified into a specific leaf node, it must logically belong to all its ancestor nodes. For example, an "iPhone" classification necessitates belonging to the "Mobile Phone" and "Electronics" categories.
This approach utilizes a "Semantic Loss" function. The logic rules are compiled into a Sentential Decision Diagram (SDD), a specialized data structure that enables the model to calculate how well its predictions satisfy the logic constraints in a differentiable way. This effectively "forces" the network to respect the hierarchical structure during training.
2. The GCN-based Approach
The second method models the taxonomy as a graph structure. TaxoKnow employs a Batch-based Graph Convolutional Network (BGCN) where the taxonomy acts as a "backbone" graph. During each training iteration, the documents in the batch are dynamically linked to this backbone.
The GCN generates "ideal" representations for the nodes based on their positions within the graph. The model is then penalized (using Euclidean distance) if its predicted probability distribution deviates from these graph-informed embeddings. This geometric approach provides a "softer" set of constraints that can enhance the model's ability to generalize.
Experimental Evaluation
The TaxoKnow framework was evaluated on four diverse multi-class text datasets:
- In-house Shopping Mall: 84 classes across a 3-level taxonomy of user queries.
- In-house Call Center: 134 classes across a 3-level taxonomy of customer service logs.
- RCV1 (Reuters): A benchmark dataset featuring 53 sub-categories.
- Amazon Product Reviews: A large-scale dataset with 300 sub-categories.
Key Insights and Results
The experiments revealed several critical advantages of the TaxoKnow approach:
- Alleviating Data Imbalance: By conditioning predictions on higher-level concepts, the search space for rare "long-tail" classes is significantly reduced. If the model identifies a sample as "Electronics," it can more accurately distinguish between specific sub-classes even with limited examples.
- Logic vs. Geometry: While symbolic logic ensures strict adherence to rules, the GCN approach often achieved higher Macro Average F1-scores. This suggests that the geometric constraints of the graph help the model generalize better to rare classes.
- Performance Gains: TaxoKnow consistently outperformed fine-tuned BERT baselines. In supervised learning on the Call Center dataset, the symbolic approach boosted Macro F1 from 56.55% to 60.84%. In semi-supervised settings with only 20% labeled data, the GCN method on the Reuters dataset improved the Macro F1-score from 68.51% to 74.94%.
Conclusion and Limitations
TaxoKnow demonstrates that integrating taxonomic prior knowledge into the loss function is a powerful technique for improving multi-class classification. However, the method currently focuses on "flat" classification (predicting leaf nodes) and assumes a complete, correct taxonomy. Additionally, while the "batch-based" GCN approach mitigates computational overhead, the symbolic compilation into SDDs adds complexity. Future research may explore "Neuro-Symbolic" systems that refine taxonomies during training, further bridging the gap between structured reasoning and deep learning.
Summary updated