NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ConvTextTM: An Explainable Convolutional Tsetlin Machine Framework for Text Classification

Bimal Bhattarai, Ole-Christoffer Granmo, Lei JiaoLREC 2022

Abstract

ConvTextTM is a novel text classification framework that adapts the Convolutional Tsetlin Machine (CTM) to natural language processing. By utilizing propositional logic and a BERT-powered vocabulary, it bridges the gap between high-accuracy "black box" deep learning models and interpretable rule-based systems. This paper details the architecture, evaluation across seven datasets, and the inherent explainability of the model, demonstrating that state-of-the-art performance can be achieved without sacrificing transparency.

Introduction

In the current landscape of Natural Language Processing (NLP), researchers face a significant trade-off. Massive models like GPT-3 and BERT offer incredible accuracy but operate as "black boxes," making their internal decision-making nearly impossible to audit. Conversely, interpretable models like Decision Trees are transparent but often fail to match the performance of deep learning architectures.

Furthermore, existing Tsetlin Machines (TMs)—a promising logic-based alternative to neural networks—have historically struggled with text. They typically treated documents as a "Set-of-Words" (SOW), ignoring word order and local context, and suffered from "vocabulary sparsity" when encountering out-of-vocabulary words. ConvTextTM addresses these challenges by introducing spatial awareness and a robust tokenization scheme.

Methodology

ConvTextTM introduces the spatial awareness of convolutions to the logic-based Tsetlin Machine through four primary stages:

  1. Text Fragmenting: Instead of processing a whole document at once, the model breaks text into a sequence of overlapping windows (fragments), allowing it to capture local context.
  2. BERT-Powered Vocabulary: To solve the sparsity problem, ConvTextTM utilizes the fixed tokenization scheme from BERT. This allows the model to handle sub-words and common tokens effectively, managing spelling errors and rare words without needing corpus-specific vocabularies.
  3. Convolutional Logic: The model applies "filters" in the form of conjunctive clauses across text fragments. These clauses use propositional logic (AND/NOT operations) to identify patterns. For example, a clause might detect the presence of specific keywords while excluding others within a window.
  4. Voting Mechanism: Each clause "votes" for a particular class. The final classification is determined by a majority vote, making the decision process a simple summation of logical rules.
The classification process in ConvTextTM, from window division to the final argmax decision.

Experimental Results

The researchers evaluated ConvTextTM across seven diverse datasets to test its versatility, ranging from fact-checking (PolitiFact, GossipCop) to academic categorization (WOS-5736). ConvTextTM did not just match the performance of "black box" models; in several cases, it outperformed them:

  • Fact-Checking: On the PolitiFact dataset, ConvTextTM achieved 91.21% accuracy, surpassing both BERT (88%) and XLNet (89.5%).
  • Academic Classification: On the WOS-5736 dataset, it reached 91.28%, slightly edging out specialized deep learning architectures like HDLTex-CNN.
  • Simplicity: Notably, the model achieved these results without using pre-trained word embeddings (like GloVe), relying purely on the logical relationships between BERT tokens.

Interpretability and Key Insights

A core advantage of ConvTextTM is its inherent interpretability. Because the model is built on discrete clauses rather than floating-point weights, the learned rules can be directly extracted and visualized. The authors demonstrate this by generating word clouds of the specific tokens that triggered classifications, providing a level of transparency that "attention weights" in Transformers cannot match.

Word clouds visualizing the specific tokens that trigger classifications, providing human-readable explanations for model decisions.

Key insights from the study include:

  • Position Awareness: The convolutional approach makes the model "local position-aware," recognizing where words appear relative to others in a fragment.
  • Efficiency: By using bitwise operations instead of complex floating-point math, TMs are potentially much more energy-efficient and hardware-friendly than traditional neural networks.
  • Window Sensitivity: Performance is highly dependent on window size. Long-form text (like news articles) benefits from larger windows to capture linguistic patterns, whereas short-form text (like Tweets) requires tighter windows to avoid noise.

Conclusion and Future Work

ConvTextTM represents a major step forward for interpretable NLP. While highly effective, the authors note that the model can still struggle with subtle sentiment nuances (e.g., "not good" vs "good, not") because the internal window processing still relies on a Set-of-Words approach. Future research will explore more sophisticated windowing techniques and potential hybridization with other semantic features to better capture complex linguistic shifts.

Summary updated

BibTeX
@inproceedings{bhattarai2022convtexttm,
  author = {Bimal Bhattarai and Ole-Christoffer Granmo and Lei Jiao},
  title = {{ConvTextTM: An Explainable Convolutional Tsetlin Machine Framework for Text Classification}},
  booktitle = {LREC},
  year = {2022},
  url = {https://openreview.net/forum?id=aArfZkbHaYy},
}
Figure