Abstract
Most supervised text classification approaches assume a closed world, counting on all classes being present in the data at training time. This assumption can lead to unpredictable behaviour during operation, whenever novel, previously unseen, classes appear. Although deep learning-based methods have recently been used for novelty detection, they are challenging to interpret due to their black-box nature. This paper addresses interpretable open-world text classification, where the trained classifier must deal with novel classes during operation. To this end, we extend the recently introduced Tsetlin machine (TM) with a novelty scoring mechanism. The mechanism uses the conjunctive clauses of the TM to measure to what degree a text matches the classes covered by the training data. We demonstrate that the clauses provide a succinct interpretable description of known topics, and that our scoring mechanism makes it possible to discern novel topics from the known ones. Empirically, our TM-based approach outperforms seven other novelty detection schemes on three out of five datasets, and performs second and third best on the remaining, with the added benefit of an interpretable propositional logic-based representation.
Introduction: The Open-World Challenge
Standard AI text classifiers typically operate under a "closed-world assumption," presuming that every input encountered during deployment will belong to one of the categories seen during training. In real-world scenarios, such as banking chatbots or news aggregators, this assumption often fails. When a standard neural network—relying on a softmax layer—encounters a completely new topic, it is mathematically forced to assign it to a known category, often with high but misplaced confidence.
The challenge lies in novelty detection: the ability of a system to operate in an "open world," identifying and flagging inputs that belong to previously unseen classes rather than misclassifying them. While deep learning models struggle to explain why they flag an input, this research proposes a transparent alternative using Tsetlin Machines.
Methodology: Leveraging Conjunctive Clauses
The proposed approach utilizes the Tsetlin Machine (TM), a model that replaces the complex calculus of neural networks with propositional logic. Instead of weights and biases, a TM learns "clauses"—logical rules such as (word1 AND word2 AND NOT word3). These clauses represent frequent patterns that characterize specific known classes.
The core innovation is the Novelty Score. In a standard TM, clauses vote for or against a class. In this framework, the system calculates the sum of triggered clauses for each known class. If a piece of text matches many of the logical patterns learned during training, it receives a high score and is considered "known." Conversely, if it matches very few patterns, it is flagged as "novel." This "pattern density" serves as a proxy for knowledge; novelty is defined not just by the presence of new words, but by the absence of expected logical structures.
Experimental Results
The researchers evaluated the TM-based framework against seven other novelty detection algorithms, including One-class SVM and K-Means clustering, across five diverse datasets: 20-Newsgroup, CMU Movie Summary, Spooky Author Identification, Web of Science (WOS), and BBC Sports.
Key findings include:
- Superior Performance: The TM approach outperformed all other schemes on three out of five datasets (Spooky Author, CMU Movie, and BBC Sports).
- High Accuracy: On the BBC Sports dataset, the model achieved an impressive 89.47% accuracy in distinguishing novel topics from known ones.
- Interpretability: Unlike "black-box" models, the TM allows users to inspect the specific combination of words (clauses) that the model expected to see but were absent in the novel text.
On the Web of Science (WOS) dataset, the method was surpassed by distance-based algorithms. This is likely due to the high volume of shared technical vocabulary across different academic fields, which makes it harder for logical clauses to define distinct boundaries between classes.
Conclusion
By using raw clause counts rather than normalized probabilities, the Tsetlin Machine avoids the "softmax trap" that leads to overconfidence in neural networks. This logic-based approach provides a robust and interpretable foundation for open-world text classification. Future work will focus on scaling the framework to larger corpora and refining the distinction between noisy outliers and true novelty.
Summary updated