Tsetlin Machine research · the count floor
Every next word,
a sum of votes you can read.
Before a language model made of logical clauses can matter, it has to beat a model that only counts. This page builds that model in your tab: it reads ten public-domain books, counts every pattern of up to five words, and predicts the next word as an exact sum of clause votes, each one traced back to the pages it was counted from.
Reading ten books…
1 · the glass box
Write, and read why it guesses what it guesses
Each guess is a vote. A pattern it counted in the books, like “the last two words were best of”, is a clause: it fires when your text ends that way and votes for the words that came next. Your own text is a second source: a memory of what you have written so far.
2The next word
3Why
2 · where the words come from
A glass box shows how much it copies
Let the model write on its own, sampling each word from its votes. Every word is shaded by the longest stretch of the books it continues, so you can see at a glance which parts are new and which are copied.
3 · the floor, measured in this tab
How surprised is it by chapters it never counted?
Nineteen chapters were held out and never counted. The page scores every word of them, once with each amount of context and once with the memory of the chapter so far. Lower is better: perplexity is the number of words it is, on average, choosing between.
4 · what the programme measured
Ninety-one claims, written down before the runs
The first study of glassbox-lm wrote down 91 hypotheses with thresholds before the runs they govern, and reports each one as it came out: 12 met, 11 not met, 7 not judged, 61 never run. Writing them down first is what makes a negative result count.
Point at a square to read the hypothesis.
H1.1 not met · kill criterion KB7 triggered
2.2193 vs 1.3719
bits per byte on the WikiText-103 test split: the Tsetlin Machine language model against the Kneser-Ney 5-gram on the same tokens. One seed; seeds 2 and 3 were not run.
run 20260923T042350Z_CP_anchor
H8.2 met
5.3 × 10−15
largest difference in ln P between Kneser-Ney and its clause-vote form over 282,587 validation positions. Kneser-Ney is exactly a clause-vote machine; this page repeats the check above.
run 20260924T102203Z_cvtm_a3_H8_2
H8.1 met, against its own signed votes
1.8280 vs 2.1749
bits per byte when the learned clauses vote by counts instead of their trained votes: counting beat the trained votes, and still sat at the level of a bigram model (1.8073).
run 20260924T062704Z_cvtm_H8_1_causal_cp20M
H8.7 met · validation
1.3501 → 1.2409
bits per byte when document clauses add a memory of the article so far, at constant cost per word. The same memory runs on this page.
run 20260924T102454Z_cvtm_a3_H8_7
The second study, hierarchical_tm, ended mostly negative as well: its single final test scored AUC 0.735 on same-article pairs, below 0.817 for plain word overlap. Every id, qualifier and run is in the results overview.
Read this before quoting a number
- A reimplementation, checked. The model on this page is the CVTM-core of the study (section 11 of its engine specification) written again in JavaScript. A test runs the study's own Python code on the same tokens: every probability agrees to within 4 × 10−15.
- A different corpus. Ten public-domain books, lowercase words, 678,041 counted tokens. The study used WikiText-103 with byte-level subwords. Perplexities here are per word and are not comparable with its bits per byte.
- No Tsetlin Machine runs here. This is the floor the study measured its Tsetlin Machine language model against. That model stayed above it, which here means worse.
- Fitted the study's way. The weights of the memory come from the study's MAP-EM on 14 training chapters, chosen by the study's residue rule (10 percent instead of 1, because there are 208 chapters instead of 28,472 articles).
- New words. A word the books never use gets one of 64 slots: the counts have never seen it, the memory can learn it from your text.