ILM: Integer Language Model
ILM is a CPU-only language model: it needs no GPU and computes no gradient. It is deterministic, learns each benchmark in seconds, and shows how it found each answer. What it learns is lines of English: rules, question forms and facts.
Highlights
ILM 2.0.0 reads each benchmark with frozen code on its test data: the official test split, or for LoNLI the part that its notes name. The runs use one desktop CPU with no GPU. The time is for the whole run, learning from all lessons and answering the test questions, as the best of three or more runs.
| Benchmark | Lessons | ILM | Published, for comparison | Time |
|---|---|---|---|---|
| bAbI, 20 tasks | 1,000 for each task, answers only | 19 of 20 tasks pass; 18,903 of 19,399 right (97.44%) Task 14 (time) fails: 519 of 1,000 right (51.9%). 601 test questions with the story of a lesson are not read. | the best published learner from the answers only that we found fails 3 tasks (Universal Transformer) | 14.0 s |
| SCAN, 4 splits | the first 1,000 of each train split | 17,016 of 17,016 right (100%) | Transformer: length 0.0%, add jump 1.0% T5-11B: 2.0% and 98.3% | 1.5 s |
| ProofWriter, depth 5, open and closed form | about 600 for each depth of proof, answers only | 39,870 of 40,063 right (99.52%) Rules of the library read the told rules: this number measures the engine, not rules that ILM learned. | ProofWriter (T5-11B): 99.6% and 99.7% | 0.4 s |
| LoNLI, 17 groups of logic in NLI | 1,000 to 1,013 for each group, answers only | 14,714 of 14,986 right (98.18%) on its sealed part | tuned on MNLI, not on LoNLI: 59.4% to 71.1% RoBERTa-large tuned on 2% of LoNLI: near 100% | 2.5 s |
| CLUTRR, graph form, 2 to 10 relations | 1,002 graphs of 2, 3 and 4 relations, answers only | 1,036 of 1,045 right (99.14%) During development, the board's read part held 527 of these 1,045 test graphs (shares only). | at 10 relations: Transformer 70%, NCRL 97%, R5 98% | 1.4 s |
| Sentence transformations, 4 parts | 1,000 for each part, answers only | 80,000 of 80,000 whole sentences right (100%) | models from scratch: near 0% whole sentences on the generalization sets | 1.6 s |
| PCFG SET, 3 splits | the first 1,000 of each train file | 31,229 of 31,229 right (100%) | Transformer: plain split 92%, systematicity 72%, productivity 50% | 8.4 s |
| ToM-QA, 12 kinds | 600 stories for each kind, answers only | 1,950 of 1,950 right (100%) Not a read of unseen cases: the board read this test split during development (shares only, never a wrong case). | the best model of each form: 88.63% to 100.00% | 2.1 s |
bAbI, 20 tasks
ILM: 19 of 20 tasks pass; 18,903 of 19,399 right (97.44%)
Task 14 (time) fails: 519 of 1,000 right (51.9%). 601 test questions with the story of a lesson are not read.
Lessons: 1,000 for each task, answers only
Time: 14.0 s
SCAN, 4 splits
ILM: 17,016 of 17,016 right (100%)
Lessons: the first 1,000 of each train split
Time: 1.5 s
ProofWriter, depth 5, open and closed form
ILM: 39,870 of 40,063 right (99.52%)
Rules of the library read the told rules: this number measures the engine, not rules that ILM learned.
Lessons: about 600 for each depth of proof, answers only
Time: 0.4 s
LoNLI, 17 groups of logic in NLI
ILM: 14,714 of 14,986 right (98.18%) on its sealed part
Lessons: 1,000 to 1,013 for each group, answers only
Time: 2.5 s
CLUTRR, graph form, 2 to 10 relations
ILM: 1,036 of 1,045 right (99.14%)
During development, the board's read part held 527 of these 1,045 test graphs (shares only).
Lessons: 1,002 graphs of 2, 3 and 4 relations, answers only
Time: 1.4 s
Sentence transformations, 4 parts
ILM: 80,000 of 80,000 whole sentences right (100%)
Lessons: 1,000 for each part, answers only
Time: 1.6 s
PCFG SET, 3 splits
ILM: 31,229 of 31,229 right (100%)
Lessons: the first 1,000 of each train file
Time: 8.4 s
ToM-QA, 12 kinds
ILM: 1,950 of 1,950 right (100%)
Not a read of unseen cases: the board read this test split during development (shares only, never a wrong case).
Lessons: 600 stories for each kind, answers only
Time: 2.1 s
The papers give some of these as fractions; they are shown here as percentages.
A time is the wall-clock time of the whole run with the release build: the choice of the ways of the tool, the controls, the learning from all lessons, and the read of the test data. Each time is the best of three or more runs in turn of the commands of the repository, in a fresh copy of it with the data fetched from the public sources. At 24 threads each benchmark needs 1 GB of memory or less, and the board 3.1 GB. On one thread (ILM_LANES=1), the whole board of 112 tasks takes 210 s with a peak of 2.6 GB, and bAbI 27.6 s.
Where ILM is strong
- Meaning built from parts. On SCAN length and add jump, on the longer inputs and the new pairs of PCFG SET, and on the new builds of the sentence transformations, transformers that learn from scratch stay low; ILM learns each from 1,000 lessons.
- It joins up to 10 relations of CLUTRR from lessons of 2 to 4 relations, and it passes 19 of the 20 bAbI tasks from 1,000 lessons each.
Where ILM is weak
- Text that people wrote. ILM learns no task of the board whose text people wrote: the stories of CLUTRR, the word problems (MAWPS, ASDiv, SVAMP), the descriptions of regular expressions of NL-RX, the rules in the words of people of ParaRules, and the intents and slots of ATIS and SNIPS. On these, pre-trained transformers lead.
- It gets no result on StepGame, SpartQA, FLD and BoardgameQA, and it does not learn the second belief of ToMi.
- On bAbI, task 14 (time) fails on its test split, 519 of 1,000 right (51.9%), although ILM reads its development data at 100%: learned from 943 or more of its lessons, it reads "before" in the order of the story, and the stories of that task tell the times out of order.
- On ProofWriter, rules of the library read the told rules: that number measures the engine, not rules that ILM learned, and it is level with ProofWriter (T5-11B), not ahead.
- The ToM-QA number is not a read of unseen cases: the board read that test split during development (shares only, never a wrong case).
- During development the board read 527 of the 1,045 CLUTRR graph test graphs (shares only, never a wrong case).
What ILM discovered
On the board, ILM learns 79 of 112 tasks. The board's ladder says how each learned task reads:
15
Discovered
Read by learned lines, with no rule of the library.
29
Learned
Learned lines with rules of the library.
7
Mixed
Learned and written lines.
28
Written
Lines of the library alone.
Rules discovered from lessons
Rules that a person can read
Rewrites with no fact of the library
Facts read from Wikipedia
data/explain/learned/capitals.txt from a plain-text copy of the English Wikipedia, with sentence shapes that it learned itself and the lessons of LoNLI's world group as the judge. Each fact names the files and lines of its sentences, and the board counts the facts of that task as discovered.Features
CPU only
Seconds per benchmark
No gradients
Deterministic
Proofs
ilm prove prints the answer to a story and a question with its proof tree in English, back to the told sentences. Each rule is marked as given (a line of the library) or as discovered on a kind, and each learned fact as discovered.Answer marks
Missing steps
ilm why shows, for each lesson that a model answers wrong, the proof of the answer that it gave and the first step that the facts of the story miss for the wanted answer.Facts from a large text
ilm facts reads the facts of a text of the library from plain text that people wrote, and keeps the source of each fact.The store
data/store keeps the rules that the board discovered, each with the kind and the number of lessons that it came from, for other kinds to judge on their own lessons. Only ilm store-lines writes it.Editing
ilm places lists the open places that the reader takes in each line, and ilm concepts lists the texts and what each builds on. A text that a program wrote (data/explain/learned) is refused when a person changed a line of it.Why no GPU
A neural network, such as a transformer, learns by changing millions of decimal weights. It repeats billions of multiplications over many passes through the data, and a GPU is built for that work. ILM has no weights. What it learns is lines of English: rules, question forms and facts. It keeps a line when the line answers the lessons right, and it finds this by counting. Counting is the addition of whole numbers, and a normal CPU does it fast.
A proof tree
To see a proof, give a story and a question to ilm prove, with the case file of a kind whose lessons the model learns from. It prints the answer and its proof tree, back to the told sentences:
./target/release/ilm prove "Zoe went to the studio. Zoe picked up the lamp. Zoe went to the cellar. Where is the lamp?" cases=cases/final/src_babi/babi02.txt
cellar
proof of the answer location: C if latest B has the A now and latest B went to the C
read at its time: latest zoe has the lamp now (the latest value of this state at that point of the story)
zoe has the lamp now by the rule: If A got the B and latest the holder of the B is C then C has the B now [given]
zoe got the lamp by the rule: If A picked up the B then A got the B [discovered on babi02]
told: zoe picked up the lamp
read at its time: latest the holder of the lamp is zoe (the latest value of this state at that point of the story)
the holder of the lamp is zoe by the rule: If A got the B then the holder of the B is A [given]
zoe got the lamp (its proof is shown above)
read at its time: latest zoe went to the cellar (the latest value of this state at that point of the story)
told: zoe went to the cellarEach rule in the tree is marked as given (a line of the library) or as discovered from the lessons of the kind.
How ILM stands against transformers
- bAbI, 1,000 examples: mean error, lower is betterTasks failed (of 20): ILM 1, Universal Transformer 3, Transformer 5. 601 test questions with the story of a lesson are not read.ILM: 2.48%vs Transformer, best of 10 runsTransformer, best of 10 runs: 21.8%vs Universal Transformer, best seed for each taskUniversal Transformer, best seed for each task: 4.55%
- SCAN, lengthILM: 100%Transformer: 0%
- SCAN, add jumpILM: 100%Transformer: 1%
- PCFG SET, productivityILM: 100%Transformer: 50%
- PCFG SET, systematicityILM: 100%Transformer: 72%
- CLUTRR graph, 10 relationsDuring development the board read 527 of the 1,045 test graphs (shares only, never a wrong case).ILM: 100%Transformer: 70%
- Sentence transformations, generalization setsILM: 100%Transformer: near 0%
- ToM-QANot a read of unseen cases: the board read this test split during development (shares only, never a wrong case).ILM: 100%vs the best model of each form, from scratch (EntNet, RelNet, Multiple Observer)the best model of each form, from scratch (EntNet, RelNet, Multiple Observer): 88.63% to 100%
- ProofWriter, depth 5ILM: 99.52%vs ProofWriter (T5-11B), pre-trained, with proofsProofWriter (T5-11B), pre-trained, with proofs: 99.6% and 99.7%
- LoNLI, sealed partAhead of the models with no LoNLI lesson; not of RoBERTa-large tuned on 2% of LoNLI.ILM: 98.18%vs BERT-base, RoBERTa-large and DeBERTa-large, pre-trained, tuned on other NLI setsBERT-base, RoBERTa-large and DeBERTa-large, pre-trained, tuned on other NLI sets: 59.4% to 71.1%vs RoBERTa-large, pre-trained, tuned on 2% of LoNLIRoBERTa-large, pre-trained, tuned on 2% of LoNLI: near 100%
The papers give some of these as fractions; they are shown here as percentages. On SCAN, PCFG SET and the sentence transformations, ILM learns from 1,000 lessons, and the published models from 14,670 to 100,000.
Each published number names its paper (by arXiv number or venue). DIFF marks a place where the setting of ILM differs from the paper's. The papers give some of these as fractions; they are shown here as percentages.
Level or ahead
These rows are the final reads of the card. The Transformer column gives the plain Transformer, trained from scratch on the task, where a paper gives one.
| Benchmark | ILM | Transformer, from scratch | Other published learners | DIFF |
|---|---|---|---|---|
| bAbI, 1,000 examples | 1 task fails; mean error 2.48% | 5 tasks fail; mean error 21.8% (best of 10 runs; arXiv 1807.03819) | Universal Transformer, best seed for each task: 3 fail, 4.55% (arXiv 1807.03819) | 601 test questions with the story of a lesson are not read |
| SCAN length and add jump | 100.0% and 100.0% | 0.0% and 1.0% (arXiv 2007.08970) | T5-11B, pre-trained: 2.0% and 98.3%; LANE, made for SCAN: 100.0% and 100.0% (arXiv 2007.08970) | ILM learns from 1,000 commands of each train split, the published models from all of it (14,670 to 16,990) |
| PCFG SET, systematicity and productivity | 100.0% and 100.0% | 72% and 50% (arXiv 1908.08351) | LSTMS2S: 53% and 30%; ConvS2S: 56% and 31% (arXiv 1908.08351) | 1,000 pairs against 81,000 to 85,000 |
| CLUTRR, graph form, 10 relations | 100% (122 of 122) | 70% (arXiv 2007.06477, 2303.03581) | Edge Transformer 92%; CTP 95%; NCRL 97%; R5 98% (arXiv 2112.00578, 2007.06477, 2303.03581, 2205.06454) | 1,002 lessons against about 15,000 graphs; ILM reads the test split of the hub copy; during development the board read 527 of the 1,045 test graphs (shares only, never a wrong case) |
| Sentence transformations, generalization sets | 100.0% whole sentences | near 0% whole sentences; the right word moved: 4% to 7% (arXiv 2203.09397) | T5 and mT5, pre-trained: near 100% whole sentences in a figure, but for the German passive (arXiv 2203.09397) | 1,000 rows against 100,000 |
| ToM-QA | 100.0% on each kind | - | the best model of each form, from scratch (EntNet, RelNet, Multiple Observer): 88.63% to 100.00% (arXiv 1808.09352) | the test splits of the hub copies, which the board read during development; 600 stories against 10,000 for each pair |
| ProofWriter, depth 5 | 99.52% (level, not ahead) | - | ProofWriter (T5-11B), pre-trained, with proofs: 99.6% and 99.7% (arXiv 2012.13048) | 600 statements against about 70,000; rules of the library read the told rules |
| LoNLI, sealed part | 98.18% (ahead of the models with no LoNLI lesson; not of RoBERTa-large tuned on 2% of LoNLI) | - | BERT-base, RoBERTa-large and DeBERTa-large, pre-trained, tuned on other NLI sets: 59.4% to 71.1% (arXiv 2112.02333, table 4); RoBERTa-large tuned on 2% of LoNLI: near 100% (arXiv 2112.02333) | the published means are over all 17 groups |
More results from the board
These rows are the board's read parts: the last 400 cases of each kind, or fewer (for ATIS and SNIPS up to 3,000: ATIS reads 890 of its 893 test utterances), and not final reads of whole test splits. For each task, ILM gives its lowest kind and the number of lessons that it learns from. "Not learned" is a kind below the bar; "no result" is a kind that no way of the tool reads.
| Task | ILM, lowest kind (lessons) | Transformer, from scratch | Best published (pre-trained or other) | DIFF |
|---|---|---|---|---|
| ToMi, statement form: where the thing is, where it was, first belief | 100.0%, 100.0%, 98.2% (600) | - | EntNet 90.6%, RelNet 86.0%, over all questions (Le and others 2019, ACL anthology D19-1598) | a statement judged true or false (tasksource/tomi-nli), for each question type; ILM does not learn the second belief |
| RuleTaker, closed form, depths 0 to 5 | 97.5% (600) | - | RoBERTa-large, pre-trained: 99% on its own test part; trained to depth 3: 97.6% on depth 5 (arXiv 2002.05867) | 600 against about 70,000; rules of the library read the told rules |
| ParaRules, rules in the words of people | 88.0%, not learned (600) | - | ProofWriter (T5-11B): 99.9% to 91.5% by depth (arXiv 2012.13048); RoBERTa trained with ParaRules: 98.8% (arXiv 2002.05867) | 600 against 28,010; rules of the library read the told rules |
| PrOntoQA, 5 hops | 100.0%, not counted: a regularity passes it (600) | - | GPT-2, pre-trained and tuned, answers only: 93.8%; Coconut: 99.8% (arXiv 2412.06769) | 600 against 9,000 |
| ProsQA | 100.0% (600) | - | GPT-2, pre-trained and tuned, answers only: 76.7%; iCoT, with written chains: 98.2% (arXiv 2412.06769) | 600 against 17,886; rules of the library read the told rules |
| NLGraph: connectivity, cycle, flow | 100.0%, 100.0%, 100.0% (600) | - | text-davinci-003: connectivity 86.82% (chain of thought with self-consistency), cycle 70.33% (4 examples) (arXiv 2305.10037) | a prompt against 600 lessons; rules of the library |
| MindGames: forehead, forehead with mirror, explicit, internal | 100.0%, 100.0% (not learned: the question alone gives 98.5%), 98.8%, 99.0% (600) | - | deberta-small, pre-trained, all four setups together: 83% on the validation part (arXiv 2305.03353) | each setup apart against all setups together; rules of the library |
| StepGame, 1 to 10 steps | no result (600) | Universal Transformer: 45.11% at 1 step, 11.74% at 10 steps (arXiv 2204.08292) | TP-MANN: 85.77% and 21.46% (arXiv 2204.08292); SynSup, pre-trained: 98.6% and 45.7% (arXiv 2307.07696) | about 10.7% wrong labels in a hand count of 1,000 cases |
| SpartQA, yes or no | no result (600) | - | XLNet, pre-trained: 79.91% (arXiv 2104.05832) | ILM's kind has three answers (yes, no, not told) |
| FLD | no result (600) | - | T5, pre-trained, tuned with proofs: 91.6% (arXiv 2308.07336) | |
| BoardgameQA | no result (600) | - | figures only (arXiv 2306.07934) | 1,000 training examples against ILM's 600 |
| CLUTRR, stories by people | no result (1,000) | - | BERT-LSTM: 67% at 2 and 3 relations (arXiv 1908.06177); DSR-LM: 60.98% (arXiv 2305.03742) | |
| NL-RX: made descriptions, descriptions by people | no result (1,000) | - | Deep-RegEx: 88.7% and 58.2% (arXiv 1608.03000) | the paper compares the languages of two expressions, ILM compares strings |
| ATIS: intent, slots | 85.7%, not learned; no result (1,000) | - | Slot-Gated, from scratch: 94.1%, slots F1 95.2%; Joint BERT, pre-trained: 97.5%, slots F1 96.1% (arXiv 1902.10909) | the slot kind asks the slot words, not F1 over tags |
| SNIPS: intent, slots | 88.5%, not learned; no result (1,000) | - | Slot-Gated: 97.0%, slots F1 88.8%; Joint BERT: 98.6%, slots F1 97.0% (arXiv 1902.10909) | as ATIS |
| Word problems: MAWPS (4 parts), ASDiv-A, ASDiv, SVAMP | 33.3% to 67.2%, 7.8%, 4.2%, no result; not learned (600) | - | Graph2Tree, from scratch: 83.7%, 77.4%, 36.5%; with RoBERTa: 88.7%, 82.2%, 43.8% (arXiv 2103.07191); PaLM 540B with chain of thought: MAWPS 93.3%, SVAMP 79.0% (arXiv 2201.11903) | ILM learns from the answers only, the published models from equations |
BIG-bench tasks of the board. The published rows are large pre-trained language models with 3 solved examples in the prompt, on the test cases of each task, 250 for most and 146 for penguins_in_a_table (BIG-Bench Hard, arXiv 2210.09261, table 3), some tasks as one part or as the mean of three sizes. No paper gives a Transformer trained from scratch on these tasks.
| Task | ILM, lowest kind (600 lessons) | Best published model, 3 examples | Human raters, mean |
|---|---|---|---|
| tracking_shuffled_objects | 100.0% | Codex with chain of thought: 84.5% | 64.7% |
| temporal_sequences | 100.0% | Codex with chain of thought: 96.8% | 90.8% |
| word_sorting | 99.8% | Codex: 50.4% | 62.6% |
| boolean_expressions | 100.0% | Codex with chain of thought: 92.8% | 79.4% |
| multistep_arithmetic | 100.0% | InstructGPT with chain of thought: 53.2% | 9.7% |
| hyperbaton | 100.0% | PaLM 540B with chain of thought: 90.4% | 74.7% |
| logical_deduction | 100.0% | Codex with chain of thought: 60.4%; GPT-4 with Logic-LM: 87.63% (arXiv 2305.12295) | 40.3% |
| navigate | 100.0% | Codex with chain of thought: 96.4% | 81.9% |
| object_counting | 100.0% | Codex with chain of thought: 93.2% | 86.1% |
| web_of_lies | 100.0% | PaLM 540B with chain of thought: 100% | 81.3% |
| dyck_languages | 100.0% | Codex with chain of thought: 56.8% | 47.8% |
| reasoning_about_colored_objects | 100.0% | Codex with chain of thought: 91.6% | 75.4% |
| date_understanding | 93.8%, not learned | Codex with chain of thought: 87.2% | 76.8% |
| formal_fallacies | 98.0% | InstructGPT with chain of thought: 58.4% | - |
| geometric_shapes | 100.0% | InstructGPT with chain of thought: 56.0% | 54.0% |
| penguins_in_a_table | no result (too few cases) | InstructGPT with chain of thought: 81.5% | 78.0% |
| arithmetic, 1 to 5 digits | 100.0% on 15 of 15 kinds | GPT-4 at 5 digits: 0.0% (multiplication) to 94.1% (addition); Goat-7B, tuned on about 1 million pairs: 96.5% to 98.4% (arXiv 2305.14201) | - |
Where transformers and other published models lead
On text that people wrote, pre-trained transformers lead: the stories of CLUTRR, the word problems, NL-RX, the rules in the words of people of ParaRules, and the intents and slots of ATIS and SNIPS. Published models also lead on StepGame, SpartQA, FLD and BoardgameQA, where ILM gets no result. The rows are in the table above.
What ILM does that a transformer does not
- A proof for each proved answer.
ilm proveprints the proof tree of an answer in English, back to the told sentences (the example under Features; testsan_answer_is_explained_by_a_proof_from_the_told_sentencesanda_proof_of_the_library_answers_from_told_sentences_alone). - The source of each rule and fact. Each rule in a proof is marked as given, a line of the library that a person wrote, or as discovered on a kind: the example under Features shows "[discovered on babi02]" from a model of bAbI task 2, and the test
a_proof_marks_each_rule_and_learned_fact_as_discovered_or_givenchecks the marks of a proof against the lists of learned rules and facts that it gets. Each fact ofdata/explain/learned/capitals.txtnames the files and lines of the sentences that gave it, and each rule ofdata/storenames the kind and the number of lessons that it came from (testthe_store_keeps_the_lines_of_each_kind_whole_and_reads_back_what_it_wrote). - A mark for how an answer was found. Each answer is marked proof, default, guess or none (tests
a_story_with_a_sentence_of_a_frame_that_no_lesson_showed_is_answered_as_a_guessandan_answer_that_holds_otherwise_is_known_as_a_default). On the board, 98.8% of the answers with a proof mark are right, and 74.5% of those with a guess mark. A proof mark is not a promise: in the final read of bAbI task 14, 73.0% of the answers with a proof mark are right. - Learning writes no file of the library. The lines that a kind learns belong to its model (test
a_learned_model_lists_its_learned_lines_and_the_rules_that_a_proof_rests_on). In the code, only two commands write files of the library or of the store (data/store):ilm factswithout=, andilm store-lines; no test checks the files after a run. A learned text that a person changed is refused (testa_learned_text_is_refused_when_a_person_edited_it_or_a_hand_text_has_its_name), and a run with fewer lessons than its set gives is offered no stored rule (testa_run_of_fewer_lessons_than_its_set_gives_is_offered_no_store). - Few lessons. 73 of the 79 tasks that the board learns are also learned from 200 lessons of each kind. On SCAN, PCFG SET and the sentence transformations, ILM learns from 1,000 lessons, and the published models from 14,670 to 100,000.
- The same result on every run. In the timed runs, on 1 thread and on 24 threads, all 8 benchmarks and the board give the same counts (11 runs of each), on one CPU and with no GPU.
Each benchmark
The published numbers come from the papers named in each table, by arXiv number.
Notes on the numbers
- During development, ILM used the training and validation data of each set. The board also reads a fixed part of the test split of some sets (the last cases of each kind), and of that part only the share of right answers was looked at, never a wrong case: the last 400 cases of each test split of SCAN, ProofWriter, the sentence transformations and PCFG SET; 527 of the 1,045 test graphs of CLUTRR in the graph form; and the whole test split of ToM-QA. So the ToM-QA number is not a read of unseen cases.
- Reads of test data that gave or changed a number: the test splits of bAbI, SCAN and ProofWriter two times, by two builds of the program (the counts of bAbI and ProofWriter differ between the reads, SCAN's do not); the sealed part of LoNLI two times; the test splits of CLUTRR in the graph form, the sentence transformations, PCFG SET and ToM-QA once by a final run, after the board's read parts had held a part of them (see above). The tables give the last read.
- On one computer, every count is the same in every run and for every number of threads. Another operating system can give a logarithm that differs in its last bit, and in a rare close decision this could move a count; the CI checks the bAbI counts on Linux, Windows and macOS.
How it works
ILM learns a kind of task from lessons. A lesson is a short text, a question and the exact answer. What ILM learns is lines of a library in plain English: rules, question forms and facts. It keeps a line when the lessons show that the line answers right. The result is a set of lines that a person can read, and each answer names the lines that gave it, with a proof tree when steps prove it.
1
Lessons
A short text, a question and the exact answer.
2
Lines of English
Rules, question forms and facts, in a library of texts in plain English.
3
Kept lines
A line is kept when the lessons show that the line answers right.
4
Answers with proofs
Each answer names the lines that gave it, with a proof tree when steps prove it.
One tool and its library
ILM has one tool, the explain tool, and a library of texts in plain English (data/explain). A text holds rules ("If A is a parent of B and B is a parent of C then A is a grandparent of C."), told facts, question forms with their answers, and lines that write a sentence again. The engine chains the rules over the told sentences of a case until nothing new comes, and it answers with the first answer whose conditions hold.
The tool has one call: it learns from lessons, and then it answers a told text with a question. Each answer has a note that tells how the tool found it, and a proof that ilm prove prints.
For each kind, the tool tries its ways of reading on the first two thirds of the lessons and judges them on the last third. Then it learns again from all lessons. No person chooses a way for a kind, and no setting changes between kinds. This is the cross-validatory choice of Stone. A learned line is written as a line of the library, so a person reads what was learned.
What the tool learns
For each kind of task, the tool learns lines of the library from the lessons:
Learned wording
Discovered rules
data/store offers the rules that the board discovered to other kinds, which judge them again on their own lessons.Joining, meanings and rewrites
Facts from a large text
ilm facts reads the facts of a text of the library from plain text that people wrote. The file data/explain/learned/capitals.txt holds the capitals that it read from a plain-text copy of the English Wikipedia, each with the files and lines of its sentences; the copy is not in the repository.Each part in detail
The board
The board measures all kinds of 25 public sets on their read parts, with the same program: 240 kinds in 112 tasks. A set gives only its files, its sizes, who wrote its text and its marks. ILM learns 165 kinds and 79 tasks in 14 sets, by the bar under How a kind is measured. 73 of the 79 tasks are also learned from 200 lessons. The whole board takes 29.2 s at 24 threads.
For each task, the board says what reads it:
- Read by: learned (every line that reads the told text or answers was learned from the lessons of the kind), written (lines of the library alone), or mixed.
- Rules by: discovered (every rule that the proofs of the answers rest on was learned from the lessons, and no text of the library holds it), given (rules of the library), or mixed.
- Facts by: the facts known before the story that the proofs rest on, discovered, given or mixed.
- The ladder of the learned tasks: 15 discovered (read by learned lines, with no rule of the library), 29 learned (learned lines with rules of the library), 7 mixed (learned and written lines) and 28 written (written lines alone).
- Answer marks, over all read cases: proof 78.4% (of these, 98.8% right), default 18.1%, guess 2.4% and none 1.1%. A proof mark says that steps prove the answer and that the text holds no pair of pieces in a row that the lessons did not show; a default comes from an "otherwise" line.
- Learned from 200 lessons: whether the task is also learned when each kind learns from its first 200 lessons alone.
How a kind is measured
- The cases of a kind are cut into a learned part, a read part and a sealed part. All cases with the same told sentences stay in one part.
- A case is right only when the words of the answer are exactly the words of the true answer.
- Three controls stand beside the model: one answer for all cases, plain counting, and the question alone.
- A kind is learned at 95% or more of the read cases, and only when the model is 5 points or more above one answer for all and above the question alone. So a kind whose answers need no reading of the text is not learned.
- Read cases that are copies of lessons do not count. When a kind has copies, the share on its other read cases counts, and only with 50 or more of them.
- On the board, the bar is 90% for a set whose text people wrote (ATIS, CLUTRR, ParaRules, SNIPS and the word problems). A set can also mark a kind where the question alone gives so much that no model can be 5 points above it (ProofWriter, closed form, depth 5; ParaRules, depths 3 and 4). Such a kind passes at the bar alone.
- On the board, the read cases are read again with new words in place of the names, places and things.
- A control of changed cases asks whether the answer follows a change of the text. A model reads changed forms of lessons that it answers right, and the control counts how often it gives the new true answer.
ilm changesandilm controlrun this control on request; the audits that ran it set the not_counted marks of the set descriptions, and a task with such a mark does not count. - The sealed part is for one final run with frozen code. The final reads of the benchmarks read their test data in the same way.
Two controls stand beside the tool, and the measure uses them only as controls. Plain counting is naive Bayes over the words of the question and of the last told sentences. The question alone is the higher of two shares: the same count on lessons with every told sentence taken away, and, for a kind with told sentences, a decision list over the words of the question and the pairs of its common words.
Exact results
- Counts are whole numbers. The shares that decide a vote are exact fractions.
- Sums of doubles use the compensated sum or one fixed order of terms.
- Tables keep the order of first sight. Of equal candidates, the first one is taken.
- Work is cut into runs on all threads, and the runs are joined in their order. So the result is the same for every number of threads.
- No result reads the order in which words get their numbers.
Limits
ILM is not a general chat model. It learns one kind of task at a time from lessons of that kind, and each lesson needs the exact answer. It does not learn tasks whose text people wrote.
The board measures 25 public sets (240 kinds in 112 tasks) on held cases of each kind. ILM learns 79 tasks: every kind of the task at 95% right or more (90% where people wrote the text), and 5 points or more above the controls. The board also says how each learned task reads: 15 discovered (read by learned lines, with no rule of the library), 29 learned (learned lines with rules of the library), 7 mixed, and 28 written (lines of the library alone).
Where ILM does not learn
- Text that people wrote. No task of the board whose text people wrote is learned: the stories of CLUTRR (no result), the word problems of MAWPS and ASDiv (not learned) and of SVAMP (no result), the intents of ATIS and SNIPS (not learned) and their slots (no result), the rules in the words of people of ParaRules (not learned), and the descriptions by people of NL-RX (no result).
- Other sets: StepGame, SpartQA, FLD, BoardgameQA and the made descriptions of NL-RX give no result. ILM does not learn the second belief of ToMi, a kind of the set that the board does not count as a task.
- bAbI task 14 (time): 519 of 1,000 on its test split. Learned from 943 or more of its lessons, the kind reads "before" in the order of the story, and the stories of the task tell the times out of order (see the bAbI section).
- Rules read by the library: ProofWriter, RuleTaker, ProsQA, NLGraph and MindGames are learned tasks of the written rung. Their told rules are read by lines that a person wrote.
Code
The program is a Rust workspace of five crates:
| Crate | What it holds |
|---|---|
crates/ilm-core | words and numbers, the explain tool with its engine, its learners and its proofs, the choice of its ways, the cut of the cases |
crates/ilm-data | the readers of the public sets, the fetch of their files, the facts step over a large text, the writers of changed cases |
crates/ilm-eval | the measure of a kind, the board, the controls |
crates/ilm-commands | the commands |
crates/ilm | the program ilm |
The build needs Rust 1.97 or later. A release build takes about 4 minutes, because of full link-time optimization. The program uses the memory allocator mimalloc, so the build needs a C compiler.
The code follows the rules of the crate premise: an idea is a type with its published source, every constant, type and function states its reason, and the code holds no comments and no unnamed numbers. The tests use made-up cases and need no downloaded data.
ILM reads public sets from the Hugging Face hub and GitHub at fixed revisions. data/sources.txt names every raw file with its SHA-256, and data/sets describes how each set becomes case files. The repository holds no data of the sets. Each set keeps its own license. The library of texts is in data/explain, and the store of discovered rules is in data/store.
License: Apache License 2.0.
Run it with an AI coding agent
Give this prompt to an AI coding agent, such as Claude Code, Codex or Cursor. It follows the Quick start of the README: it builds ILM, runs bAbI on your computer and shows a proof.
Clone https://github.com/Datamine-Crypto/ILM and follow the Quick start in its README. Install what it needs (the stable Rust toolchain, a C compiler and curl), build ILM, then fetch, export and measure bAbI. Show me the right answers of each of the 20 tasks; their sum is 18,903 of 19,399. Then run the ilm prove example of the README and show me its proof tree. For the other benchmarks, use docs/REPRODUCE.md.
Or run the Quick start yourself
You need the stable Rust toolchain, a C compiler and curl. Run the commands from the root of the clone. The release build takes about 4 minutes.
cargo build --release ./target/release/ilm fetch data/sources.txt sets=src_babi ./target/release/ilm export src_babi data/sets/final/src_babi.txt cases/final/src_babi ./target/release/ilm measure cases/final/src_babi
fetch gets the raw files of bAbI from the Hugging Face hub at a fixed revision and checks their SHA-256. export writes a case file for each of the 20 tasks. measure learns each task from its 1,000 lessons and reads its test questions. The last line gives the right answers of each task; their sum is 18,903 of 19,399.
With Rust, cargo install --locked datamine-ilm builds and installs the program ilm from crates.io. Run it from the root of the clone in the same way.