Abstract
Deep Neural Networks (DNNs) often rely on spurious correlations—accidental patterns in training data—leading to poor generalization on counterfactual or out-of-distribution examples. This paper introduces a robust and interpretable text classification framework based on Tsetlin Machines (TM). By leveraging a "specificity" parameter to favor negated reasoning (e.g., identifying sentiment by the absence of negative terms), the proposed model achieves significant accuracy gains over standard deep learning architectures on counterfactual test sets. The resulting model provides transparent, logic-based explanations for its predictions, bridging the gap between performance and interpretability.
Introduction: The Spurious Correlation Problem
Deep learning models are notoriously "lazy" learners, often picking up on distribution biases rather than causal linguistic features. For instance, if a dataset contains many positive reviews of a specific director, a model might learn that the director's name itself implies positive sentiment. When such a model encounters a counterfactual sentence—where the sentiment is flipped but the spurious word remains (e.g., "Nolan’s film was boring")—it fails because it relies on the shortcut rather than the causal word "boring."
While data augmentation can mitigate this, it is resource-intensive. Furthermore, the "black-box" nature of DNNs makes it difficult to diagnose these failures. This research explores the Tsetlin Machine (TM) as a logic-based alternative that is inherently more robust and transparent.
Methodology: Tsetlin Machines and Negated Reasoning
The Tsetlin Machine utilizes Tsetlin Automata to learn a set of interpretable AND-rules (conjunctive clauses). A key technical lever in this architecture is the specificity parameter ($s$).
At high specificity, the model tends to include many features, often capturing noisy spurious words. However, at low specificity, the model is forced to generalize. The authors discovered that lowering $s$ causes the TM to gravitate toward negated reasoning. Instead of searching for the presence of positive terms, the model identifies a class based on the absence of opposing terms (e.g., NOT "boring" AND NOT "bad"). Because spurious correlations are typically tied to the presence of specific high-frequency words, focusing on what is not there provides a more stable representation.
As shown in the figure above, the TM generates hard propositional logic. For an original negative sample ($S_1$), clauses like $C_1$ (containing "boring") and $C_3$ (negated literals like $\neg fascinating$) evaluate to 1, correctly triggering the negative class prediction.
Robustness to Counterfactual Shifts
The robustness of this approach is most evident when testing on Counterfactually-Augmented Data (CAD). In these sets, humans make minimal edits to flip the sentiment of a review. While standard models like Bi-LSTMs often fail these tests by clinging to the original spurious shortcuts, the TM's reliance on generalized negated clauses allows it to adapt to the change in sentiment.
In the counterfactual example ($S_1^{cf}$), the word "boring" is replaced with "fascinating." Because the negative clause $C_3$ requires the absence of "fascinating" ($\neg fascinating$), it now evaluates to 0, preventing an incorrect negative classification. This transparent logic ensures the model ignores the "shortcuts" found in non-negated features.
Key Results and Performance
The TM was evaluated against several baselines, including Bi-LSTM, ELMo, and BERT, across CAD and various Out-of-Distribution (OOD) datasets (Amazon, Yelp, Twitter).
- Counterfactual Accuracy: Trained on original data and tested on counterfactuals, the TM (at $s=2$) achieved 73.56% accuracy, significantly outperforming Bi-LSTM (55.7%) and ELMo (66.7%).
- Generalization: The model remained competitive with ELMo on OOD tasks while being significantly more lightweight.
- Interpretability: By adjusting $s$, the authors demonstrated that spurious features like "minutes" or "money" could be filtered out in favor of genuine sentiment-carrying terms.
Conclusion
Tsetlin Machines offer a promising path toward robust, interpretable NLP. By utilizing the specificity parameter to incentivize negated reasoning, TMs can ignore spurious correlations that trip up much larger deep learning models. While they currently trail behind massive pre-trained models like BERT in raw accuracy, their transparency and efficiency make them ideal for domains where understanding the "why" behind a classification is as critical as the prediction itself.
Summary updated