Abstract
Insufficient or even unavailable training data of emerging classes is a big challenge of many classification tasks, including text classification. Recognising text documents of classes that have never been seen in the learning stage, so-called zero-shot text classification, is therefore difficult and only limited previous works tackled this problem. In this paper, we propose a two-phase framework together with data augmentation and feature augmentation to solve this problem. Four kinds of semantic knowledge (word embeddings, class descriptions, class hierarchy, and a general knowledge graph) are incorporated into the proposed framework to deal with instances of unseen classes effectively. Experimental results show that each and the combination of the two phases achieve the best overall accuracy compared with baselines and recent approaches in classifying real-world texts under the zero-shot scenario.
Introduction
Standard supervised text classification requires abundant labeled data for every category. However, real-world environments are dynamic; new topics emerge constantly, such as fast-moving social media trends or new medical diagnoses, making it impossible to gather training data for every possible class beforehand.
Zero-shot text classification (ZSL) aims to classify documents into classes that were completely absent during the model's training phase. While humans can easily infer what a new category looks like based on high-level descriptions and general knowledge, machines struggle with this. Previous works in ZSL for text have mostly relied on basic word embeddings and often require some semantic overlap between training and testing classes. This paper addresses the gap by integrating rich, external semantic knowledge to bridge the divide between known and unknown text categories.
The Two-Phase Framework
The proposed framework is built on Convolutional Neural Networks (CNNs) and operates in two distinct phases to prevent the model from being overwhelmingly biased toward classes seen during training.
Phase 1: Coarse-grained Classification
This phase acts as a gatekeeper, performing binary classification to decide if an incoming document belongs to a "seen" class (present in training) or an "unseen" class. To help this phase recognize unseen classes without actual data, the authors employ data augmentation via "topic translation." By using word-level analogies (e.g., translating "company" to "village" where "firm" becomes "hamlet"), the model generates synthetic documents that capture the vocabulary of unseen classes.
Phase 2: Fine-grained Classification
Based on Phase 1's routing, the document is sent to either a traditional multi-class CNN (if seen) or a zero-shot classifier (if unseen). The zero-shot classifier utilizes feature augmentation, combining document word embeddings with target class label embeddings and a relationship vector derived from external knowledge.
Leveraging Semantic Knowledge
A core contribution of this work is the integration of four types of semantic knowledge to enhance the model's reasoning capabilities beyond simple vector space proximity.
- Word Embeddings: Capturing latent semantic relationships.
- Class Descriptions: Providing dictionary-like definitions for each category.
- Class Hierarchy: Utilizing the structural relationships between parent and child categories (e.g., "Athlete" is a "Person" which is an "Agent").
- Knowledge Graphs: Querying ConceptNet to find explicit syntactic or semantic paths (e.g., "AtLocation" or "UsedFor") between document words and class concepts.
Experimental Results
The framework was evaluated on the DBpedia Ontology and 20newsgroups datasets under strict zero-shot scenarios (25% and 50% unseen rates).
- State-of-the-Art Performance: The framework achieved the highest overall accuracy across both datasets. On DBpedia (25% unseen), it reached 85.2% accuracy, outperforming the CNN+FC baseline (81.8%). On the more challenging 20newsgroups (50% unseen), it achieved 46.9% compared to the baseline's 40.5%.
- Ablation Insights: Adding "topic translated" data in Phase 1 significantly improved unseen class detection, jumping from 38.8% to 53.6% on DBpedia. Combining all three inputs (words, labels, and ConceptNet features) in Phase 2 yielded the highest zero-shot accuracy.
Conclusion
By separating coarse and fine-grained classification and enriching the model with structured semantic knowledge, this framework effectively tackles the challenge of zero-shot text classification. Future work includes extending the model to multi-label classification and exploring domain-specific knowledge graphs for specialized technical fields.
Summary updated