Abstract
Weakly-supervised text classification aims to categorize documents using only class descriptions and unlabeled data, bypassing the need for expensive manual labeling. Traditional methods rely on keyword expansion, which is often brittle and computationally intensive. This paper presents FastClass, a framework that utilizes dense vector retrieval and external corpora to build robust classifiers. By employing a maximum entropy strategy for unsupervised subset selection, FastClass achieves state-of-the-art accuracy while reducing training time by orders of magnitude compared to existing keyword-driven approaches.
Introduction
In many real-world machine learning scenarios, practitioners are faced with vast amounts of unlabeled text but lack the resources to generate high-quality labeled datasets. Weakly-supervised text classification has emerged as a solution, typically requiring only a set of class names (e.g., "Politics," "Sports") to guide the learning process.
However, current mainstream methods are primarily "keyword-driven." These systems expand class names into keyword lists and scan unlabeled datasets for matches to create pseudo-labeled training sets. This approach suffers from three critical flaws: it is highly sensitive to the quality of initial keywords, it is computationally expensive to scan massive datasets, and it requires a high volume of task-specific unlabeled data to find sufficient matches. FastClass addresses these limitations by moving from discrete word-matching to dense semantic space, offering a more robust and time-efficient alternative.
Methodology
FastClass replaces traditional keyword expansion with a pipeline based on dense vector embeddings and submodular optimization. The process consists of three primary stages:
1. Seed Retrieval
Using Sentence-BERT (SBERT), FastClass converts class descriptions and unlabeled documents into dense vectors. It identifies a small "seed set" of documents from the task-specific data that are semantically closest to the class descriptions. This approach allows the model to capture context; for instance, it can associate "the Oval Office" with "Politics" even if the specific label is absent from the text.
2. External Enrichment
To ensure the training set is diverse and robust, FastClass leverages a massive external corpus (a 5-million document repository including Wikipedia, news, and scientific literature). The seed documents act as queries to retrieve relevant external examples. To maintain high precision and filter noise, the system only retains external documents that appear in the neighborhood of at least two different seeds.
3. Optimal Subset Selection and Model Tuning
To prevent overfitting on redundant data, FastClass employs a facility location function—a type of submodular optimization—to select a diverse subset of retrieved documents. This ensures the training data covers the semantic breadth of each class.
Because weak supervision lacks a labeled validation set for hyperparameter tuning, FastClass introduces the Maximum Entropy Principle. The framework trains multiple candidate classifiers with varying settings and selects the one that produces the highest entropy (the most balanced distribution) across the unlabeled data. This serves as an effective unsupervised signal for model selection.
Experimental Evaluation
The authors evaluated FastClass across nine diverse classification tasks, including topic classification (Yahoo, AGnews, 20News, DBPedia), sentiment analysis (Yelp, Amazon, SST-B), and specialized tasks like emotion and situation detection.
Performance and Accuracy
FastClass outperformed state-of-the-art keyword-driven models, such as X-Class and ClassKG, on six of the nine datasets. Notably, on the 20News dataset, FastClass achieved an accuracy of 55.4%, significantly higher than ClassKG’s 49.4%. While keyword-driven methods maintained a slight edge on highly structured datasets like DBPedia, FastClass proved more consistent across varied domains.
Efficiency and Speed
The most significant advantage of FastClass is its computational efficiency. On the Yahoo dataset, FastClass completed training in just 1.7 hours, whereas the competing ClassKG required 41.7 hours. Furthermore, FastClass is 5-7 times faster during inference than entailment-based zero-shot models, as it requires only a single forward pass through the classifier to predict labels.
Conclusion
FastClass demonstrates that semantic similarity is a more robust signal for weak supervision than discrete keyword matching. By combining dense retrieval with external data enrichment and an entropy-based selection strategy, the framework provides a practical, high-speed solution for text classification in label-scarce environments. Future work may explore more complex architectures to handle "Other" categories in open-domain scenarios and further refine performance on highly structured datasets.
Summary updated