Abstract
Research on multi-class text classification of short texts mainly focuses on supervised (transfer) learning approaches, requiring a finite set of pre-defined classes which is constant over time. This work explores deep constrained clustering (CC) as an alternative to supervised learning approaches in a setting with a dynamically changing number of classes, a task we introduce as dynamic topic discovery (DTD). We do so by using pairwise similarity constraints instead of instance-level class labels which allow for a flexible number of classes while exhibiting a competitive performance compared to supervised approaches. First, we substantiate this through a series of experiments and show that CC algorithms exhibit a predictive performance similar to state-of-the-art supervised learning algorithms while requiring less annotation effort. Second, we demonstrate the overclustering capabilities of deep CC for detecting topics in short text data sets in the absence of the ground truth class cardinality during model training. Third, we showcase that these capabilities can be leveraged for the DTD setting as a step towards dynamic learning over time.
The Challenge of Static Classification
Most text classification systems are "static," relying on a fixed set of categories defined at training time. However, in real-world scenarios like social media monitoring or news aggregation, new topics frequently emerge. Standard supervised models fail here because their output layers are hard-coded to a fixed number of classes. While unsupervised methods like LDA can find new topics, they often lack the predictive accuracy of supervised learning and struggle to automatically adapt to a changing number of clusters.
To bridge this gap, the authors introduce Dynamic Topic Discovery (DTD). The goal is to build a system that can accurately classify known topics, discover new ones, and adapt to a changing number of categories without requiring a total overhaul of the labeling scheme.
Methodology: Deep Constrained Clustering
The core of the CC-Top framework is Deep Constrained Clustering (CC). Instead of training on instance-level labels (e.g., "Document A is 'Sports'"), the model uses pairwise constraints:
- Must-Link (ML): Two documents belong to the same (unnamed) topic.
- Cannot-Link (CL): Two documents belong to different topics.
The Architecture and Workflow
- Backbone: A pre-trained BERT model generates text embeddings.
- Loss Functions: Specialized losses like Kullback-Leibler (KCL) and Meta-Classification Likelihood (MCL) push "Must-Link" pairs together and pull "Cannot-Link" pairs apart in the probability space.
- Overclustering (OC): To handle an unknown number of topics, the model's output layer ($n_{out}$) is set to be larger than the expected number of classes ($K$). The model then "discovers" the true number of topics by naturally grouping data into a subset of these available clusters.
- DTD Workflow: The model is first trained on "old" topics (Phase 1). When new data arrives with a mixture of old and new topics (Phase 2), the model is fine-tuned using only pairwise constraints to expand its repertoire.
Experimental Results
The researchers evaluated CC-Top on three standard benchmarks: AG News (4 classes), TREC coarse (6 classes), and DBpedia (14 classes).
Near-Supervised Performance
On the DBpedia dataset, the CC-KCL model achieved an accuracy of 0.982, nearly matching the fully supervised upper baseline of 0.989. This demonstrates that pairwise constraints can be as effective as explicit labels for short-text classification.
Robustness and Overclustering
A key finding was the model's robustness to uncertainty regarding the number of classes. Even when the model was configured with 30 output neurons for a 14-class dataset, it maintained high accuracy and Normalized Mutual Information (NMI). The model effectively used the extra capacity to find the "true" $K$, leaving redundant clusters empty.
Successful Topic Discovery
In DTD simulations, the model successfully identified new classes appearing in Phase 2. While initial Phase 1 models struggled with the novel data (ACC ~0.71), fine-tuning with pairwise constraints in Phase 2 restored performance to 0.978, proving the system's ability to adapt over time.
Insights and Future Work
CC-Top demonstrates that pairwise constraints are a powerful, flexible alternative to traditional labeling. They are often easier for humans to provide for short texts than selecting from a massive list of categories.
However, some challenges remain. The authors noted training instability when the number of constraints is low and relied on a heuristic (clusters must contain >1% of data) to identify "real" topics. Future research could explore more principled ways to determine active clusters and the use of Active Learning to select the most informative pairs for labeling, further increasing efficiency.
Summary updated