Introduction
Most modern text classifiers operate under a "closed-world" assumption, where the model is forced to categorize every input into a pre-defined set of labels. However, in real-world applications like social media monitoring or autonomous systems, new topics and categories emerge constantly. When a standard classifier trained on "Sports" and "Politics" encounters an article about "Cooking," it will incorrectly assign it to one of the known classes with high confidence. This limitation highlights the need for open-world classification, where a model must accurately classify known categories while having the self-awareness to reject instances from unknown classes.
Methodology: Deep Open Classification (DOC)
The authors propose DOC (Deep Open Classification), a framework that adapts a standard Convolutional Neural Network (CNN) for text to handle open-world scenarios through two primary modifications to the output layer.
1-vs-Rest Sigmoid Layer
Instead of the traditional Softmax final layer—which normalizes probabilities and forces a choice among known classes—DOC utilizes $m$ independent sigmoid functions, one for each known class. This architectural shift allows the model to treat each class as a separate binary decision. If the probabilities for all $m$ classes fall below a certain threshold, the document is rejected as "unseen."
Gaussian Fitting for Tighter Boundaries
A standard sigmoid threshold of 0.5 is often insufficient for open-world rejection, as it leaves significant "open space" where unknown classes might be misclassified. DOC addresses this by calculating a custom threshold $t_i$ for each class $i$. The model fits a half-Gaussian distribution to the predicted probabilities of the training data. By analyzing the standard deviation ($\sigma_i$), DOC sets a tighter boundary, typically defined as $t_i = \max(0.5, 1 - 3\sigma_i)$. This approach "wraps" the decision boundary more closely around known positive examples, reducing the risk of false positives from unknown classes.
Experimental Setup
The performance of DOC was evaluated on two benchmark datasets:
- 20 Newsgroups: Approximately 20,000 documents across 20 categories.
- 50-class Reviews: Amazon product reviews covering 50 different product categories.
To simulate an open-world environment, the models were trained on a subset of classes (25%, 50%, or 75%) and tested on the full set, with held-out categories serving as the "unseen" class.
Results and Discussion
DOC significantly outperformed existing baselines, including cbsSVM and OpenMax (a method originally designed for computer vision).
As shown in the results for the 20 Newsgroups dataset, DOC achieved a Macro-F1 score of 82.3% when only 25% of classes were seen during training, compared to just 35.7% for OpenMax and 59.3% for cbsSVM. Key takeaways include:
- Softmax Limitation: The zero-sum nature of Softmax makes it unsuitable for rejection tasks. Independent sigmoids provide a more robust foundation for open-world logic.
- Thresholding Efficacy: The Gaussian fitting mechanism (DOC) consistently outperformed a fixed sigmoid threshold (DOC $t=0.5$), particularly when the number of unseen classes was high.
- Closed-World Stability: Even when 100% of classes were known, DOC maintained or exceeded the performance of standard CNNs, indicating that adding rejection capability does not degrade accuracy on known data.
Conclusion
DOC provides a practical and effective solution for open-world text classification. By tightening decision boundaries using Gaussian fitting and moving away from Softmax, it enables models to "know what they don't know." Future work involves extending this framework to lifelong learning, allowing systems to incrementally learn from the classes they initially reject.
Summary updated