torchtsetlin: Fast, Interpretable Tsetlin Machines for PyTorch
Summary
- torchtsetlin introduces Tsetlin machines implemented as native PyTorch modules, integrating interpretable rule-based learning directly into the deep learning ecosystem.
- The library features vanilla, weighted, coalesced, regression, convolutional, and dense segmentation variants, supporting standard PyTorch methods like .to(device) and state_dict().
- It utilizes a batched formulation of Type I and Type II feedback using binomial draws, committing once per mini-batch.
- On benchmark tests, torchtsetlin matches existing library accuracy while training significantly faster than PyTsetlinMachineCUDA and tmu on the same GPU.
Why it matters
By integrating Tsetlin machines into PyTorch, torchtsetlin bridges the gap between gradient-free interpretable models and deep learning infrastructure, enabling faster training and easier deployment.