Building Concise Logical Patterns by Constraining Tsetlin Machine Clause Size

Kuruge Darshana Abeyrathna, Ahmed Abdulrahem Othman Abouzeid, Bimal Bhattarai, Charul Giri, Sondre Glimsdal, Ole-Christoffer Granmo, Lei Jiao, Rupsa Saha, Jivitesh Sharma, Svein Anders Tunheim, Xuan Zhang

Introduction

Tsetlin Machines (TMs) represent a promising shift toward interpretable, logic-based artificial intelligence. Unlike "black-box" neural networks, TMs learn by composing conjunctive clauses (AND-rules) using Tsetlin Automata. However, a significant hurdle in their adoption is "clause bloat"—the tendency of vanilla TMs to produce excessively long rules containing redundant literals. This paper introduces Clause Size Constrained Tsetlin Machines (CSC-TMs), a novel variant that imposes a soft limit on clause length to enhance both interpretability and hardware efficiency.

The Problem of Clause Bloat

In standard Tsetlin Machines, there is no direct mechanism to limit the number of features (literals) included in a clause. This often results in rules that are too complex for human auditing. For example, a rule intended to identify a "Football" category might include hundreds of irrelevant or negated terms, making it as opaque as a deep neural network. Furthermore, in hardware implementations like FPGAs or ASICs, longer clauses increase "switching activity," leading to higher power consumption.

Comparison of concise clauses (top) versus bloated clauses (bottom) in Tsetlin Machines.

Proposed Method: CSC-TM

The authors address this by modifying the Type I Feedback loop of the TM. They introduce a user-defined budget ($b$) for the maximum number of literals per clause.

  • Soft Constraint: While a clause is within the budget, it receives standard feedback to include discriminative literals.
  • Feedback Inversion: Once the budget is exceeded, the feedback logic flips to reward "Exclude" actions and penalize "Include" actions.
  • Transient Oversizing: This "soft" approach allows clauses to briefly exceed the limit during exploration before being pruned back, ensuring the model can still find optimal logical structures.

Experimental Evaluation and Key Findings

The CSC-TM was tested across diverse domains, including NLP (BBC Sports, IMDb), image classification (MNIST), and reinforcement learning.

Less is More: Improved Accuracy through Sparsity

One of the most striking findings was that for several NLP datasets, accuracy actually improved when clauses were constrained. For instance, on the BBC Sports dataset, the average literal count dropped from 44.14 to 2.64, while accuracy rose from 94.1% to 99.1%. This suggests that the constraint acts as a regularizer, filtering out noisy, non-essential features.

Visualization of 'Good' vs 'Bad' learned patterns, demonstrating how constraints can filter noise and produce cleaner logical representations.

Hardware Synergy and Interpretability

By reducing clauses to just a few literals, the model's decisions become immediately readable. A "Football" rule might simplify to a clear club ∧ football pattern. From a hardware perspective, fewer literals mean fewer logic gate transitions, offering a direct path to ultra-low-power edge AI. On MNIST, CSC-TM achieved 98.42% accuracy with a literal budget of 16, outperforming binary versions of Logistic Circuits.

Conclusion

CSC-TM successfully bridges the gap between high-performance machine learning and human-readable logic. By achieving up to an 80x reduction in model complexity without sacrificing accuracy, it paves the way for more transparent and energy-efficient AI systems. Future work will explore more sophisticated constraints, particularly for Convolutional TMs, to better handle spatial information while maintaining concise logic.

Summary updated

BibTeX
@inproceedings{abeyrathna2023building,
  author = {Kuruge Darshana Abeyrathna and Ahmed Abdulrahem Othman Abouzeid and Bimal Bhattarai and Charul Giri and Sondre Glimsdal and Ole-Christoffer Granmo and Lei Jiao and Rupsa Saha and Jivitesh Sharma and Svein Anders Tunheim and Xuan Zhang},
  title = {{Building Concise Logical Patterns by Constraining Tsetlin Machine Clause Size}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.24963/ijcai.2023/378},
}
Figure