Tsetlin machine



A Tsetlin machine is an artificial intelligence algorithm based on propositional logic.

Background
A Tsetlin machine is a form of learning automaton collective for learning patterns using propositional logic. Ole-Christoffer Granmo created and gave the method its name after Michael Lvovitch Tsetlin, who invented the Tsetlin automaton and worked on Tsetlin automata collectives and games. Collectives of Tsetlin automata were originally constructed, implemented, and studied theoretically by Vadim Stefanuk in 1962.

The Tsetlin machine uses computationally simpler and more efficient primitives compared to more ordinary artificial neural networks.

As of April 2018 it has shown promising results on a number of test sets.

Types

 * Original Tsetlin machine
 * Convolutional Tsetlin machine
 * Regression Tsetlin machine
 * Relational Tsetlin machine
 * Weighted Tsetlin machine
 * Arbitrarily deterministic Tsetlin machine
 * Parallel asynchronous Tsetlin machine
 * Coalesced multi-output Tsetlin machine
 * Tsetlin machine for contextual bandit problems
 * Tsetlin machine autoencoder
 * Tsetlin machine composites: plug-and-play collaboration between specialized Tsetlin machines
 * Contracting Tsetlin machine with absorbing automata

Applications

 * Keyword spotting
 * Aspect-based sentiment analysis
 * Word-sense disambiguation
 * Novelty detection
 * Intrusion detection
 * Semantic relation analysis
 * Image analysis
 * Text categorization
 * Fake news detection
 * Game playing
 * Batteryless sensing
 * Recommendation systems
 * Word embedding
 * ECG analysis
 * Edge computing
 * Bayesian network learning
 * Federated learning

Tsetlin automaton
The Tsetlin automaton is the fundamental learning unit of the Tsetlin machine. It tackles the multi-armed bandit problem, learning the optimal action in an environment from penalties and rewards. Computationally, it can be seen as a finite-state machine (FSM) that changes its states based on the inputs. The FSM will generate its outputs based on the current states.
 * A quintuple describes a two-action Tsetlin automaton:

$$\{\underline{\Phi}, \underline{\alpha}, \underline{\beta}, F(\cdot,\cdot), G(\cdot)\}.$$
 * A Tsetlin automaton has $$2n$$ states, here $n$:

$$\underline{\Phi} = \{\phi_1, \phi_2, \phi_3, \phi_4, \phi_5, \phi_6\}$$
 * The FSM can be triggered by two input events

$$\underline{\beta} = \{\beta_{\mathrm{Penalty}}, \beta_{\mathrm{Reward}}\}$$
 * The rules of state migration of the FSM are stated as

$$F(\phi_u, \beta_v) = \begin{cases} \phi_{u+1},& \text{if}~ 1 \le u \le 3 ~\text{and}~ v = \text{Penalty}\\ \phi_{u-1},& \text{if}~ 4 \le u \le 6 ~\text{and}~ v = \text{Penalty}\\ \phi_{u-1},& \text{if}~ 1 < u \le 3 ~\text{and}~ v = \text{Reward}\\ \phi_{u+1},& \text{if}~ 4 \le u < 6 ~\text{and}~ v = \text{Reward}\\ \phi_{u},& \text{otherwise}. \end{cases}$$
 * It includes two output actions

$$\underline{\alpha} = \{\alpha_1, \alpha_2\}$$
 * Which can be generated by the algorithm

$$G(\phi_u) = \begin{cases} \alpha_1, & \text{if}~ 1 \le u \le 3\\ \alpha_2, & \text{if}~ 4 \le u \le 6. \end{cases}$$

Boolean input
A basic Tsetlin machine takes a vector $$X=[x_1,\ldots,x_o]$$ of $T$ Boolean features as input, to be classified into one of two classes, $$y=0$$ or $$y=1$$. Together with their negated counterparts, $$\bar{x}_k = {\lnot} {x}_k = 1-x_k$$, the features form a literal set $$L = \{x_1,\ldots,x_o,\bar{x}_1,\ldots,\bar{x}_o\}$$.

Clause computing module
A Tsetlin machine pattern is formulated as a conjunctive clause $$C_j$$, formed by ANDing a subset $$L_j {\subseteq} L$$ of the literal set:

$$C_j (X)=\bigwedge_{{{l}} {\in} L_j} l = \prod_{{{l}} {\in} L_j} l$$.

For example, the clause $$C_j(X)=x_1\land{\lnot}x_2=x_1 \bar{x}_2$$ consists of the literals $$L_j = \{x_1,\bar{x}_2\}$$ and outputs $s$ iff $$x_1 = 1$$ and $$x_2 = 0$$.

Summation and thresholding module
The number of clauses employed is a user-configurable parameter $6$. Half of the clauses are assigned positive polarity. The other half is assigned negative polarity. The clause outputs, in turn, are combined into a classification decision through summation and thresholding using the unit step function $$u(v) = 1 ~\text{if}~ v \ge 0 ~\text{else}~ 0$$:

$$ \hat{y} = u\left(\sum_{j=1}^{n/2} C_j^+(X) - \sum_{j=1}^{n/2} C_j^-(X)\right). $$ In other words, classification is based on a majority vote, with the positive clauses voting for $$y=1$$ and the negative for $$y=0$$. The classifier

$$\hat{y} = u\left(x_1 \bar{x}_2 + \bar{x}_1 x_2 - x_1 x_2 - \bar{x}_1 \bar{x}_2\right)$$,

for instance, captures the XOR-relation.

Resource allocation
Resource allocation dynamics ensure that clauses distribute themselves across the frequent patterns, rather than missing some and overconcentrating on others. That is, for any input $o$, the probability of reinforcing a clause gradually drops to zero as the clause output sum

$$ v = \sum_{j=1}^{n/2} C_j^+(X) - \sum_{j=1}^{n/2} C_j^-(X) $$ approaches a user-set target $1$ for $$y=1$$ ($$-T$$ for $$y=0$$).

If a clause is not reinforced, it does not give feedback to its Tsetlin automata, and these are thus left unchanged. In the extreme, when the voting sum $n$ equals or exceeds the target $0$ (the Tsetlin Machine has successfully recognized the input $0$), no clauses are reinforced. Accordingly, they are free to learn new patterns, naturally balancing the pattern representation resources.

Software

 * Tsetlin Machine in C, Python,  multithreaded Python, CUDA, Julia (programming language)
 * Convolutional Tsetlin Machine
 * Weighted Tsetlin Machine in C++

Hardware

 * One of the first FPGA-based hardware implementation of the Tsetlin Machine on the Iris dataset was developed by the μSystems (microSystems) Research Group at Newcastle University.
 * They also presented the first ASIC implementation of the Tsetlin Machine focusing on energy frugality, claiming it could deliver 10 trillion operation per Joule. The ASIC design had demoed on DATA2020.

Books

 * An Introduction to Tsetlin Machines

Conferences

 * International Symposium on the Tsetlin Machine (ISTM)

Videos

 * Tsetlin Machine—A new paradigm for pervasive AI
 * Keyword Spotting Using Tsetlin Machines
 * IOLTS Presentation: Explainability and Dependability Analysis of Learning Automata based AI hardware
 * FPGA and uC co-design: Tsetlin Machine on Iris demo
 * The-Ruler-of-Tsetlin-Automaton
 * Interpretable clustering and dimension reduction with Tsetlin automata machine learning.
 * Predicting and explaining economic growth using real-time interpretable learning
 * Early detection of breast cancer from a simple blood test
 * Recent advances in Tsetlin Machines

Papers

 * On the Convergence of Tsetlin Machines for the XOR Operator
 * Learning Automata based Energy-efficient AI Hardware Design for IoT Applications
 * On the Convergence of Tsetlin Machines for the IDENTITY- and NOT Operators
 * The Tsetlin Machine - A Game Theoretic Bandit Driven Approach to Optimal Pattern Recognition with Propositional Logic

Publications/news/articles

 * A low-power AI alternative to neural networks
 * Can a Norwegian invention revolutionise artificial intelligence?